iOS user with language of "en", no region code, translation lookup fails

We have a bug reported where a user has a device with an en language and nil region code, and thus all NSLocalizedString lookups in are failing, meaning our string key is what is rendered onscreen. Thus, if we had this in our en.lproj/Localizable.strings file:

"some_key" = "Some string.";

It would render some_key instead of Some string. in our UI.

First question: how do I replicate this scenario locally? This question on Stack seems to almost describe the issue, but does not describe how one enters this state.

Second question: why would iOS not fall back to English in the event the region code was nil?

We have a bug reported where a user has a device with an en language and nil region code

As returned by which API?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

It appears that this is the method that returns "en":

[NSLocale currentLocale].localeIdentifier

Normally it should return something like en_US, but we now have two users for whom this value appears to only return en and for which localizations are not working properly. The first user apparently reset his phone and got things working. The second user has shown us a screenshot of his phone and it does appear to show "English -> United States" in his settings.

That’s certainly weird.

If they change their region and then change it back, does that clear the problem?

Oh, before you suggest that, make sure they grab a sysdiagnose log. That way, if it does clear the problem, we’ll have some record of the problematic state.

For more info on sysdiagnose logs, see Bug Reporting > Profiles and Logs.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

iOS user with language of "en", no region code, translation lookup fails
 
 
Q