Search code examples
iphoneioslocalizationlocalizable.strings

Adding new strings to localizable strings file in iOS


I know how to generate my Localizable.strings file from all the source (*.m) files of the project (if anyone wonders, see this).

Then, since I'm using XCode 4, I add new languages in the Identity tab of the right panel. Then I successfully edit the files for the new languages. So far, so good.

I also use some localizable strings whose keys are not strings literals, but variables, so I have to append them manually to the end of each file. I'm fine with that, no problem.

But now I'm making some changes in my code, and new localized strings are appearing. Is there a way to add those new strings to the Localizable.strings file (ideally for every language), without loosing the previous translated strings?

TIA


Solution

  • I had the same issue and found a nice little python script to do the job ! As the source is no longer available, take a look at this blog post : http://www.stevestreeting.com/2010/05/18/os-x-localisation-incremental-genstrings-and-utf-8-files/, which basically do the same
    Hope that helps !