App localization showing the key instead of the value in iOS App localization showing the key instead of the value in iOS ios ios

App localization showing the key instead of the value in iOS


So I found the problem, I guess who translated the Localizable.strings files for me is an asshole. In 4 places in my strings file there was a row as followed:

"KEY" ;= "Value"

This line cause some kind of a crash, but let the compiler to build successfully for some reason. That's why I couldn't find the bug, only when I decided to take the last Key and Value which are not translate and move them to the top of the Localizable.strings file. Then I was able to understand and see that the problem is somewhere in the middle of the file and the top Keys and Values are translated fine.


One thing that you can do catch these kind of errors is to make a copy of the strings file, change the extension to plist and try to open it in Xcode. If there is any problem in the strings file it will show in Xcode since the dictionary will contain only the keys till the point where there is an error. You can then do a Find operation and find the error until you are sure that all strings appear in the plist file. You can then rename the file back to .strings

enter image description here


If you specify table:nil, then NSBundle will try to fetch the localization from the default table (the one in SOMELANG.lproj/Localizable.strings). If you have the localization elsewhere, you should explicitly specify the table using table:@"File" (or use the NSLocalizedStringFromTable() macro in a similar manner:

NSString *value = NSLocalizedStringFromTable(@"key", @"File", nil);

Also,Double check that the Localizable.strings file is being added to

Targets -> BuildPhases -> Copy Bundle Resources

It hadn't been added automatically for me.