RickJansen
RickJansen

Reputation: 1733

NSLocalizedStringFromTable not falling back to English?

If you have an iOS App that is localized in, say, English and French, and you set your device to German, NSLocalizedString() will fall back to the English version of Localizable.strings, which is fine.

If you add a new strings file, X.strings, localized in English and French, and you use NSLocalizedStringFromTable(@"somekey", @"X", @""), that will only work for devices switched to English or French. If you switch your device to e.g. German, NSLocalizedStringFromTable() does not fall back to English, and simply returns the key, capitalized. I had expected it to fallback to English, but it does not.

Am I missing something?

Upvotes: 1

Views: 773

Answers (1)

RickJansen
RickJansen

Reputation: 1733

Hm. NSLocalizedStringFromTable() does fall back to English. I was testing in the simulator, only after deleting my App there, a clean and rebuilding it, it worked, suddenly.

Upvotes: 1

Related Questions