-1

Is it possible to change keyboard language according to change language in ios swift if possible help me for this, thank you in advance

Ajay
  • 1
  • 2
  • What do you mean by "according to change language"? – Nico Haase Jul 05 '18 at 07:28
  • the keyboard language can only be changed by the user of the device, if you thinking about forcing one in your application? https://support.apple.com/en-us/ht202178 – zero3nna Jul 05 '18 at 07:30
  • @NicoHaase according to language change of application, if application is in Arabic then keyboard language should be in Arabic, without adding it in settings, So is it possible – Ajay Jul 05 '18 at 07:32
  • @zero3nna i change my application language , so now i want keyboard language is in that language, yes am thinking about forcing application to change keyboard language – Ajay Jul 05 '18 at 07:33

1 Answers1

0

You have to override textInputMode method of UITextField and then you can set your primary language.

  • can you show me some example – Ajay Jul 05 '18 at 07:48
  • but by using this, language of keyboard will not change, it will change type of keyboard, like email, phone, etc – Ajay Jul 05 '18 at 07:53
  • yeah, that's true, mode will change only .ascii , .numpad etc. but no the language, until iOS 13, you can try overriding the primary language. https://stackoverflow.com/questions/12595970/iphone-change-keyboard-language-programmatically – Rakshitha Muranga Rodrigo Feb 11 '23 at 15:26