Localizable.strings Not Working
The iPhone offers good localization support the same way Mac OS X does. For strings, developers use a file called “Localizable.strings”. It’s a bit tricky, though. The syntax of the file is strict; any small error will cause it to stop working without warning. Unfortunately, the compiler (which doesn’t touch the file at all) can’t give any warnings or errors when a mistake is present in the file. So check your Localizable.strings closely.
Another strange thing is that the file MUST be UTF-16 encoded. In many cases, Xcode by default creates the file with UTF-8 encoding. Change the encoding to UTF-16 in Xcode by using ‘View’ –> ‘Text’ –> ‘File Encoding’.
Thanks to Cagan for the tip.
A few more iPhone-related notes:
If you are manually editing the localizable.strings files its easy to forget to add the semicolon add the end of the line. This happened to me, and because of my other build settings, the compiler didn’t warn me about it, but none of the localized strings worked. This might be a good tip to add to this page.
This happened to me, and because of my other build settings, the compiler didn’t warn me about it, but none of the localized strings worked…
Hi!
If you’re interested in a tool to collaboratively localize iOS apps for iPad or iPhone, I suggest you give a shot to https://poeditor.com/ It’s a very user friendly online translation platform that handles .strings files too, along with other popular language file formats. You’ll see that it has a sum of very useful features to aid your localization workflow, like set reference language and translation memory. Cheers and good luck with your projects!