I am running Xcode 4.3 but the same thing works with Xcode 4.2. Previously, Localizable.strings file had to be in UTF-16 to be picked up by iOS; UTF-8 strings file did not work.
But this morning, I created a new test project and my Localizable strings files where created in UTF-8 by XCode. I did not realize it right away but they do work and are being used properly on the simulator, an iOS 5 iPad and a 4.3 iPad. My question is, do you know since when this has been working? Is this documented somewhere or do I have something messed up?
A localized string can have different values depending on the language in which the project is being build. There are two categories of localized strings: the strings included in the installation package's UI, common to every MSI file.
string file, select it and on the File Inspector (right menu) select “Localize”. Select your the new language you added and click on “Finish”. If you select the file again you should see something similar to the first image below (be sure to select both the supported languages).
I've been using UTF-8 strings files for some time. Never seen a problem.
However, Apple does still recommend UTF-16.
As of March 21, 2016, Apple recommends UTF-8
I'm having problems with UTF-8 strings files under Xcode 4.3.2 building for iPhone 5.1.
It seems certain combinations of characters ( ':' or ">" in my case ) in the translated string are causing all translations after that character to use the string in the code, not the translated string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With