iOS 11 Changes Localized Date Handling

Sep 25, 2017

There’s a pretty big change in how localized dates work in iOS 11, which especially affects smaller languages that the system itself is not localized into, and that many apps don’t support directly (like Estonian). I found this interesting enough to write up.

Here’s the issue in a nutshell. If you’ve set up your iOS in a particular way for Estonian language support, here’s what you see in the native Weather app on iOS 10.

As an Estonian speaker, this is quite nice. Even if iOS is not (and probably never will be) localized into Estonian, I still see the days of week in my native language.

With exactly the same settings, here’s the Weather app in iOS 11.

Whoa. Where did my language go?

The technical answer comes from this helpful StackOverflow post.

Under iOS 11, [NSLocale currentLocale] only returns languages supported by your app’s localizations. If your app only supports English (as the base localization), then no matter what language the user selects on the device, currentLocale will always return English.

Under iOS 10 and earlier, currentLocale would directly represent the user’s chosen language and region, regardless of what localizations your app supports.

Classes such as NSDateFormatter default to using NSLocale currentLocale. So no matter what language your app actually supported through its localization, classes like NSDateFormatter would show text in the language set on the device, even it was different from the language being used by your app.

To complete the pictures side of the story, here’s the particular settings that are driving the behavior.

And, to make it more intriguing, here’s how the home screen represents the current date in iOS 11.

Okay. So, to recap. If you enable Estonian language/region support as shown on the above image, and developers are formatting dates with the correct/default NSDateFormatter approach that Apple has trained them to do for years, then…

… in iOS 10, you see dates and times in Estonian in many apps, even those that are not explicitly localized.

… in iOS 11, you see dates and times in Estonian only in those apps that are themselves localized into Estonian. Which, let’s be honest, is like 2 apps out of a million. The dates shown in the apps are not what Apple shows as “Region Format Example” in the screenshot. Unless you are on the home screen, which nevertheless chooses to still show the date in Estonian, making affairs just more confusing.

Apple is explaining the behavior in the settings screenshot above: “Apps and websites will use the first language in this list that they support” (emphasis mine). In iOS 11, this emphasized part also started applying to date locale. In iOS 10 and earlier, they let this part slide a bit, so that it really meant “Apps and websites will use the first language in this list that they support, or that the system happens to support for particular items like date/time formatting.” In iOS 11, it just does more closely what it says.

Okay. That’s the explanation. What to think of it? Is the change a bug or a feature? Better or worse?

As an Estonian speaker, I’m used to the fact that iOS and most apps may never be fully localized into my language. Having dates and times localized provides at least some level of familiarity and comfort. From a purist standpoint, seeing Frankenstein UI where English-language apps have Estonian dates in them may be undesirable. As a user, though, I am not a purist. I am a human. I prefer my own language, even if the support is Frankenstein-like and incomplete.

Take a look at those two Weather screenshots at the top of this post. Can you honestly make a case how the non-localized one is better user experience for me compared to the localized one? I can’t see this case. I hope Apple reverts the change, but I’m not holding my breath.