Primary Language of Keyboard-Extension

I am writing a keyboard-extension,
there are several buttons and these buttons have a text, therefor I am using localized strings. So the extension is always in the "correct" language.

When opening the keyboard-extension with the "world"-button (pressing it long, so that the menu is shown) there is always a line below the name of the app showing "English".

As far as I know this is the primary language, there is also one entry for "PrimaryLanguage" in the info.plist (NSExtension/NSExtensionAttributes, set to "en-US").

I tried to remove this entry, but after this the app does not start anymore.
Is there a different way to remove this entry or
is it possible to change it to the language of the localization?



Accepted Reply

In extension's Info.plist file, you have a "PrimaryLanguage" key under "NSExtension/NSExtensionAttributes".

If you set this to "mul", the extension will display "Multiple languages" instead of English.

It will however not show the current locale.
  • Setting this key to "mul" changes the text correctly, but also messes up the key bindings when using an external keyboard on iPad :(

Add a Comment

Replies

In extension's Info.plist file, you have a "PrimaryLanguage" key under "NSExtension/NSExtensionAttributes".

If you set this to "mul", the extension will display "Multiple languages" instead of English.

It will however not show the current locale.
  • Setting this key to "mul" changes the text correctly, but also messes up the key bindings when using an external keyboard on iPad :(

Add a Comment

If you don't want it to display anything, see if you can use "mis" which is the tag for "Uncoded languages".

You can find that code listed here: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry, and it's considered a valid BCP47 value by Apple.