Locale.current ignores localization native development region for Russian locale

Number:rdar://50666761 Date Originated:May 10 2019
Status:Open Resolved:
Product:iOS Product Version:
Classification:Bug Reproducible:Always
Our app supports Russian, Ukrainian and Turkish localizations. When only English is selected in iOS Settings, Locale.current returns uk_US, but Localization native development region is set to "ru". NSLocalizedString however provides strings in correct locale (russian).
DateFormatters also provide strings in ukrainian (supposably as they are using Locale.current under the hood).

As result, app is presented to user in two languages at the same time: Ukrainian and Russian.

Steps to Reproduce:
1. Create new project.
2. Remove English localization
3. Add Russian, Ukrainian, Turkish localizations
4. Open project file in text editor
5. Replace "developmentRegion = en" to "developmentRegion = ru". Optionally set CFBundleDevelopmentRegion to "ru" in Info.plist.
6. Erase content and settings or select only English language in iOS Settings.
7. Check output of NSLocalizedString and Locale.current.


Execute step 6 and open attached sample app.

Expected Results:
Locale.current returns ru_US.
DateFormatters and NSLocalizedString return strings in Russian.

Actual Results:
Locale.current returns uk_US.
DateFormatters return strings in Ukrainian.
NSLocalizedString returns strings from ru.lproj.

Tested on iOS 12, simulators and devices.

If there is any workaround, please tell us how it can be applied.


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!