title: TextField number input using Arabic keyboard
body: <p>We are using few inputs in our app that use number pad type of keyboard. We are storing that values as Int.</p>
  
  <p>Few days ago we encountered an error with one of our app users which uses Arabic keyboard. When trying to save input to database we encounter error since input is in Arabic symbols and doesn't get recognised as Int.</p>
  
  <p>I wonder how you guys solve this kind of problems. I was thinking of converting input value like this so I created a little extension for String class:</p>
  
  <pre><code>func convertToNumber() -&gt; Int {
  
      let locale = NSLocale(localeIdentifier: "EN")
      let formatter = NSNumberFormatter()
      formatter.locale = locale
  
      let number = formatter.numberFromString(self)
      let returnNumber = Int(number!)
  
      return returnNumber
  }
  </code></pre>
  
  <p>Is there any other better approach?</p>