iOS adds new preferred language when installing my 3rd party keyboard

I have an iOS app implementing a 3rd party keyboard to iOS. The app is localized has a base language which is English and one additional language which is German.


My customer reported me following behaviour (which I can reproduce):


E.g. they are coming from Spain and have only configured Spanish language on their iPad. Because I have not localization for Spanish, they want to use the app in English. But if they install my app and than my keyboard...


Settings -> Keyboard -> Keyboards -> Add my 3rd party keyboard


... iOS automatically adds German to their Preferred Language Order:


(Settings -> General -> Language & Region -> Preferred Language Order)


https://i.stack.imgur.com/3fZuT.jpg


Now to the problem:


As described here in this Apple Documentation QA1828, when using my app, iOS checks if the preferred languages contains a language which is localized by the app and only if this was not successful it will take the base language (in my case English). But because my app implements German and German is now the second preferred language, my app appears in German and not as expected by the user in English.

This is what my localization configuration in XCode looks like:


https://i.stack.imgur.com/HRXVy.png


https://i.stack.imgur.com/dLll4.png



What's the reason that iOS adds a new preferred language after adding my 3rd party keyboard?


And could this be a new behavior of iOS 12? Because before nobody reported about this kind of problem.

Replies

I don’t have any technical input on this issue (it’s way outside of my area of expertise) but I don’t have two general suggestions:

  • If you don’t get a response here, you might try reposting over in App Frameworks > Cocoa Touch to see if folks over there have any input.

  • And if that doesn’t work out my recommendation is that you open a DTS tech support incident and discuss that with out localisation expert.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hey there,


What is the primaryLanguage of your input view controller? (https://developer.apple.com/documentation/uikit/uiinputviewcontroller/1618200-primarylanguage?language=objc)


The value of this property helps the OS decide which preferred languages should be added after enabling your keyboard.


If your keyboard only supports one language, then the primaryLanguage should be changed to accurately reflect the languages it supports. If you're planning on supporting multiple languages, there are a couple ways to do this that are outlined here: https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/CustomKeyboard.html


Let me know if you have any more questions.


Thanks,

- w