Adding localization to your code

If you have not defined strings to be translated in your code with NSLocalizedString() before, you can add these strings with the help of AppTranslate

Scan strings

Click on “Scan additional strings in source code”

You will get a list of all strings that are found in your project’s source code. When you click on an item you will see the source-code around this string at the bottom to see the context.

Strings that you want to localize should be selected by clicking on the “Localize”-checkbox. You can modify the key here and change the default comment to make the translation easier later.

Before performing the next step, make sure, you have a backup of your project in GIT or other backup-media.

When you click on “Write to source code”, AppTranslate will modify your source code with the NSLocalizedString()-Function adding the comment and modifying the string if you did so.