Ios – Automating Localizable.strings

automationinternationalizationiosiphonelocalization

So, in my project I have 10 languages, and 10 Localizable.strings files.
I just created Localizable.strings files, a file for each language. Now they contain "key" = "value" pairs, and both keys and values are in English (default language).

My languages are all translated and stay in Excel files.

The question is, how can I insert all my languages in those files faster than just copying each word manually or writing a script for that?
Maybe there is a existing tool for this already?
Thanks.

Best Answer

I found an easy way to compose localizable.strings files from Excel documents.

In the Excel document, in specific columns I insert " " = " " symbols. It's easy to do for all the words by dragging Excel cell down from the corner, so that it copies stuff from that cell to all the cells you drag it to. (sorry for messy explanation)

Thus the document contains the same symbols and words as localizable.strings does. Than I just copy everything to the text file, remove tabs, change extension to .strings. (no comments saved unfortunately).

EDIT: You can copy the stuff from Excel to Sublime Text, then Find & Replace tabs if any. Copy resulted stuff into proper Xcode .string file.

Related Topic