Вопрос

Is there any other way to localize iPhone apps beside the use of Localizable.strings? Can I use Google Translate or something like that?

I have my application written in English, and I have created Localizable.strings files for about twenty languages. I have the English Localizable.strings working perfectly, and I have tried Italian as well. Is there any way to translate these Localizable.strings to the rest of the languages automatically?

I mean is there any program or something to do the job for me?

Это было полезно?

Решение

In short: No, there is no program for that. It's the same problem as translating any text: You need to understand the meaning to give useful translations.

As a quick fix, you can of course simply take the strings in your Localizable.strings file and copy them into a Spreadsheet, then run one column through Google Translate and copy the result back. Then reverse the procedure and you have a translated Localizable.strings. A regex for doing this would be:

^"(.*)"\s*=\s*"(.*)";$

that works fine in eg. TextWranger with grep mode on, then you can replace the text with

\1\t\2

to create a the tab-delimited file from a strings file.

I still suggest you invest in a native speaker of each language to double-check the translations, or your app will become a laughing stock. Google Translate just can't replace a real human yet...

Другие советы

To localize your app you can use Localizable.strings or use localized XIB. I don't use the second approach because it is more cumbersome to manage. With Localizable.strings you have to code a little bit more but I prefere it. To translate I think you can use google translate (I do that) and build the file for each language. If you want to use an online translator, remember that it can be not always available and your user must be connected all the time. So my advice is to build all the language files since they are managed by the OS and you will have a more reliable solution.

You should create Localizable.strings for each language and translate them with any translation tool

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top