title: String to Double conversion nil in different region Swift
body: <p>There is a text field</p>
  <pre><code>@IBOutlet weak var txt: UITextField!
  </code></pre>
  <p>When I tried to convert the value of txt into Double its worked fine in US region.</p>
  <p>For example</p>
  <pre><code>let magicNumber = Double(txt.text ?? &quot;0.0&quot;)
  </code></pre>
  <p>If I type 12 UITextField then 12 assigned on magicNumber</p>
  <p>Then I changed the region to Germany.</p>
  <p><a href="https://i.stack.imgur.com/GyZBn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GyZBn.jpg" alt="enter image description here" /></a></p>
  <pre><code>let magicNumber = Double(txt.text ?? &quot;0.0&quot;)
  </code></pre>
  <p>If I type 12,8 UITextField then the magicNumber is nil.</p>
  <p>I need a correct double value like : 12.8</p>
  <p>How could I achieve this? Please suggest to me the correct way.</p>