duplicate languages in settings menu, [NSLocale preferredLanguages] now return different language formats
| Originator: | dubenko.alexandr | ||
| Number: | rdar://21959720 | Date Originated: | 23-Jul-2015 04:00 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 9 beta 1 - iOS 9 beta 4 (all betas) |
| Classification: | UI/Usability | Reproducible: | Always |
Summary: [NSLocale preferredLanguages] now return new language format: ru-RU, en-RU and old two-characters format: ru, en. Before in iOS 8 and earler its return correct two-characters format: ru, en. With this bug i can now add multiple copy of one language in settings menu. Two English for example and this will be: array(en-RU, en). I add screenshot with this situation. Steps to Reproduce: 1) open Settings > General > Language & Region 2) click Other Languages button 3) add some language, Russian for example (now u add two characters ru locale) 4) select Keep English (or what set in your default language) 5) click iPhone Language button 6) select Russian again 7) select Change to Russian Expected Results: change language to Russian and menu now show: Russian, English Actual Results: we add Russian language again, but with another code format ru-RU and in menu it show two Russian languages: Russian, Russian, English.. we can add two English now and it show: Russian, Russian, English, English Notes: Users can be shocked this situation with language list. Developers must now check 2 locales format in the method preferredLanguages, and not one as it was before, its crazy. Configuration: iPhone 6 plus, 128GB, WiFi; iPad Air, 32GB, WiFi So bafore when we click iPhone Language button it change language and show in method preferredLanguages two characters format (ru) without adding duplicate language. But now its add duplicate language with new locale format (ru-RU), i think its actual usability and programming bug. Please contact with me if need addition explanation.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
With iOS 9, the results returned by NSLocale.preferredLanguages() can differ from previous releases.
With iOS 9, the results returned by NSLocale.preferredLanguages() can differ from previous releases. In iOS 8 and earlier, only certain language, script, and region combinations were returned by this API. However, in iOS 9, more combinations of language, script, and region are permitted.
For example, when a user has configured their iOS device with language set to English and region set to India, NSLocale.preferredLanguages() will now return [ "en-IN" ], instead of [ "en" ]. This allows for smarter language fallbacks; for this user, if an app doesn’t support en-IN as a localization, but does support en-GB, the fallback mechanism will select en-GB instead of en.
Read more at : https://developer.apple.com/library/ios/technotes/tn2418/_index.html#//apple_ref/doc/uid/DTS40016588