Localizing strings in iOS: default (fallback) language?

internationalization, ios, localization

Solution

Perhaps this should help? -- iPhone: localization / internationalization default strings file

It should fallback to English by default. I've just switched my phone to a language into which my app is not localized, and the text was all in English, as expected.

Important: as @hyperspasm commented : To expand on/rephrase this, the fallback language is the language which was most recently chosen by the user in the device Settings, that is also represented in the app's bundle.

Problem

Is there a way to set a default language to be used when the device UI language is not supported by an app? Example: My app is localized into English and German: ``` // en.lproj: "POWER_TO_THE_PEOPLE_BTN" = "Power"; "POWER_PLUG_BTN" = "Power"; // de.lproj: "POWER_TO_THE_PEOPLE_BTN" = "Macht"; "POWER_PLUG_BTN" = "Spannung"; ``` Now, if I run the app on a device with UI language set to `Italian` the app will use the key strings `POWER_TO_THE_PEOPLE_BTN` and `POWER_PLUG_BTN`. There must be a way to specify a default (fallback) language to be used by the application in such a case. From the above example it should be clear that using the English string as a key will not work. The only option I see right now is to use `NSLocalizedStringWithDefaultValue` instead of `NSLocalizedString`.

Original source

Related problems