Settings.bundle Localization Broken
As I suspected, my installation of Xcode was broken.
After reinstalling Xcode by updating to 9.3.1, adding a settings bundle results in the expecyed behaviour:
Not the most common scenario, I know, but I hope this answer helps someone in the same situation someday.
iOS: Localizable.strings doesn't work
I found out what the issue is:
AppDelegate
's application:didFinishLoadingWithOptions:
contained this snippet of code
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:@[@"en"] forKey:@"AppleLanguages"];
[defaults synchronize];
which forces NSLocalizedString()
to return English values.
The project was outsourced and I had no idea that the snippet was there.
iOS localization is broken with the upgrade iOs 9 + Xcode 7
Solved, the "problem" was the key "Localization native development region" in the info.plist file. It was setted to Italy, so when the app was running in a device with the Italian language as default it was showing the Base localization version of the strings (the English version).
Changing the value to United States solved the issue.
Related Topics
How to Make a Swiftui Gesture That Keeps Running Code While the View Is Pressed
Why Are My Variables Empty When I Cast Them in My iOS Application
iOS App, Programmatically Get Build Version
How to Get the Size of a Scaled Uiimage in Uiimageview
How to Distribute iOS Applications Outside App Store
What Does Warning "Mapping Architecture Arm64 to X86_64" Mean
Ios: Present View Controller Programmatically
Possible to Limit the Countries an iOS Application Is Released To
Swift: Get All Subviews of a Specific Type and Add to an Array
How to Delete Object from Core Data in Swift 3
How to Intercept Push Notifications for Another App
Shake Animation for Uitextfield/Uiview in Swift
How to Dismiss Keyboard When Touching Anywhere Outside Uitextfield (In Swift)
Set Background Gradient on Button in Swift
How to Update Uibutton Title/Text Programmatically
Ios: Can't Save File to 'Application Support' Folder, But Can to 'Documents'