Wrong Localized Strings used when using Language+Region Combination
| Originator: | 321hendrik | ||
| Number: | rdar://28319153 | Date Originated: | 15-Sep-2016 03:56 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 9.3.3 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: In an iOS application that is localized in multiple languages where there are Localizable.strings files for English, Dutch and Dutch (Belgium), when Dutch is set as the device language and Belgium as the country, the Dutch strings are used and NOT the Dutch-Belgium strings. The Locale is set: NSLocale *locale = [NSLocale currentLocale]; NSString *language = [locale displayNameForKey:NSLocaleIdentifier value:[locale localeIdentifier]]; NSLog(@"language %@", language); > language Nederlands (Belgiƫ) But NSLocalizedString get the Dutch resource, not the Dutch (Belgium) one Steps to Reproduce: 1) Create a localized app with the above language string resources, build and install on Device 2) Go to Settings App and select Dutch as Language and Belgium as Region 3) Open the app Expected Results: When Dutch (Belgium) is selected the appropriate resources should be used for NSLocalizedString. Actual Results: The Dutch resources are used for NSLocalizedString Regression: The problem does not occur when first selecting Netherlands as Language and then selecting Vlaams (Flemish). Notes: -
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!