Because my device is set to English (U.K.) the -localizedStringForKey:withDefault: method fails to realise that it should use the English localisation file continues to look through the list returned by -preferredLanguages for the next one that is present in the iVersion bundle.
Here is the debug output from my device, first showing the language codes as listed in Settings -> General -> Language & Region -> Preferred Language Order. Followed by the list of localisations included in the iVersion bundle.
(lldb) po [NSLocale preferredLanguages]
<__NSCFArray 0x168f8a90>(
en-GB,
de,
ru,
ar,
en,
pt,
pt-PT,
zh-Hans
)
(lldb) po [bundle localizations]
<__NSCFArray 0x1681c4e0>(
da,
de,
en,
es,
fr,
it,
ja,
pt-PT,
pt,
ru,
zh-Hans
)
Because my device is set to English (U.K.) the
-localizedStringForKey:withDefault:
method fails to realise that it should use the English localisation file continues to look through the list returned by-preferredLanguages
for the next one that is present in the iVersion bundle.Here is the debug output from my device, first showing the language codes as listed in Settings -> General -> Language & Region -> Preferred Language Order. Followed by the list of localisations included in the iVersion bundle.