0

I have an application that supported 2 languages English and Arabic when changing the app language to Arabic all UITextFields support Arabic numbers only.

For example: When writing an email "test123@gmail.com" It appears at UITextField "test١٢٣@gmail.com"

I tried to set

    txtFldEmail.textField.keyboardType = .asciiCapable
    txtFldEmail.textField.textContentType = .emailAddress

And also,

    @objc func txtFldChanged(_ textField: UITextField) {
         textField.text = textField.text?.arToEnIfNeeded
    }

But no changes happen still UITextField writes numbers in Arabic.

  • Does this answer your question? [Setting keyboard to a textfield to English language only](https://stackoverflow.com/questions/36814134/setting-keyboard-to-a-textfield-to-english-language-only) – HalR Aug 17 '22 at 05:12
  • No, I want the keyboard in English and Arabic no problem, but when the app is in the Arabic language I want to write English numbers in UITextField, and that does not happen and numbers are converted to Arabic numbers. – Jo Andrew Aug 17 '22 at 08:37

0 Answers0