Can I localize into ksh-Latn_DE?

Hello,


as some of you may have see, iOS 9 now supports lesser spoken languages, such as Klingon. And whoever approved to put Kölsch (ksh-Latn_DE) into there can get a Kölsch Beer from me anytime.


For fun, I tried to localize an app into ksh-Latn_DE, however, while Dates are localized into Kölsch, My app is not.


The main problem seems to be that NSBundle.mainBundle().preferredLocalizations.first returns "en" (whereas NSLocale.currentLocale().localeIdentifier returns "ksh-Latn_DE".


The language of the iPhone is German, so at the very least my suspicion would have been that the preferred language is "de" (if not "ksh")


You can find the sample on https://github.com/below/Lost-In-Translation


Is my iPhone set up wrong? Is my code wrong?


Thanks


Alex

The main problem seems to be that NSBundle.mainBundle().preferredLocalizations.first returns "en" (whereas NSLocale.currentLocale().localeIdentifier returns "ksh-Latn_DE".

You seem to be mixing up languages and locales. I just posted, in another thread, tips for debugging language choice issues.

Share and Enjoy

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

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

Thank you,


I had already performed the steps you describe in the other threads, and the French localization works flawlessly. Knowing the difference between NSLocale and preferredLanguage, my question remains:


My phone is set up like this:


iPhone Sprache: Deutsch (iPhone language: German)

Bevorzugte Sprachreihenfolge (Preferred language order)

Kölsch (Colonian)

Deutsch iPhone Sprache (German iPhone Language)

English Englisch


Shouldn't the preferred language be "ksh", or at the very least "de" (Kölsch being a dialect of German), not "en" ?

UPDATE: Adding a German Localization to the mix causes the preferred Language to be "de". However, still no Kölsch is being shown


Is localizing apps into the languages not supported by the Xcode IDE even supported, or is this something for the Future?


Thanks


Alex

Shouldn't the preferred language be "ksh", or at the very least "de" (Kölsch being a dialect of German), not "en" ?

Which preferred language? NSLocale’s

preferredLanguages
property or NSBundle’s
preferredLocalizations
property? I’d expect it to show up in the former but not in the latter (because that latter is formed by intersecting the former with the app’s list of localisations, as returned by NSBundle’s
localizations
property).

Is localizing apps into the languages not supported by the Xcode IDE even supported, or is this something for the Future?

Keep in mind that Apple’s localisation support is based on ICU and CLDR, both of which have multiple contributors, so it’s not easy to infer Apple’s future plans from observed changes like this.

Share and Enjoy

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

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

Allow me to state my main question again 😉


"Is localizing apps into ksh-Latn_DE (and other more obsure languages, like Klingon) supported"?


If the answer is: "No, this is supported only for NSLocale", my question is answered.


If the answer is "Yes, this should absolutely work", then I would like to examine why it is not working for my app


Thanks a lot


Alex

In general you can localise for any language that the user can select in the OS UI.

IMPORTANT This is with the language selector (Settings > General > Language & Region > {iPhone Language,Other Languages}) not the region selector (Settings > General > Language & Region > Region).

Share and Enjoy

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

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

Please see a screenshot of my setup:


https://raw.githubusercontent.com/below/Lost-In-Translation/master/Localization_Setting.png


As you can see, the iPhone-Language ("iPhone-Sprache") is set to "Deutsch" (German). The "other" Languages such as Klingon and Kölsch are not offered there.

"Kölsch" is at the top of the Preferred Languages ("Bevorzugte Sprachreihenfolge"), and the comment specifically says "Apps and Websites will just the first supported language from this list".


So:

1) Is it a bug that my App is not using the Kölsch Localization?

2) Is the setup of my iPhone wrong?

3) Is this just the setting for NSLocale (in which case, the comment is wrong)


Thanks a lot. This excercise is helpful in understanding the l10n system on iOS 9 a little deeper 😉


Alex

Accepted Answer

I would expect that to work. When you’re phone is set up this way and you launch a test app localised for Kölsch, what do you get back from:

  • NSLocale’s

    preferredLanguages
    property?
  • NSBundle’s

    preferredLocalizations
    property?
  • NSBundle’s localizations property?

Share and Enjoy

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

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

Thank you! Examining NSLocale preferredLanguages got me into the right direction!


Upon examining it, I saw that it contains "ksh-DE", whereas my localiziation was "ksh-Latn_DE". After renaming everything to "ksh", things work as expected.


For my entertainment, is there a good link for me to understand the "Latn_DE" part, and why that did not work?

For my entertainment, is there a good link for me to understand the "Latn_DE" part, and why that did not work?

Have a look at Appendix B: Language and Locale IDs in Internationalization and Localization Guide.

Apparently I need to read this myself (-:

Share and Enjoy

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

let myEmail = "eskimo" + "1" + "@apple.com"
Can I localize into ksh-Latn_DE?
 
 
Q