Localization in iOS and OS X

First you should become familiar with some parameters of your Xcode-Project:

Development Region

At first it looks like this would be the “Localization native development region”, defined with the key CFBundleDevelopmentRegion in your Info.plist. Unfortunately it is not. The development region is defined with a key developmentRegion in the project-section of your .xcodeproj-File which is currently not accessible in XCode directly. This key defines, which language is displayed as default (or Base, see below) language. Be careful to select something else than English here, because a user who has not defined any of your known regions (see below) in his preferences, he will see your default language. As this is a key parameter for your translation, AppTranslate modifies this parameter based on your input in your .xcodeproj-File if you decide to let AppTranslate handle files based on the .xcodeproj-File.

Base language

This is the language defined as developmentRegion. The translations of your Base-Language are stored in the folder “Base.lproj”. Storyboards that should be translated are also stored in this folder. The text mentioned in your Storyboards has to be in the base-language. You should always use Base internalization. In older projects this was not available and your Base-Language would be translated and stored like any other language. In new projects this is turned on by default.

Known Regions

These are the locales that you want to translate your app to. You should always use Base internalization. Xcode Locales

iOS and OS X have in both Objective-C and Swift some macro functions to make Localization easier:

Objective-C:

or the CoreFoundation equivalent:

Swift:

The parameters have the following meaning:

Key

The key to identify the right translation

Comment

To help the translation process and supply a context

Table (not yet supported in AppTranslate)

Besides the standard file “Localizable.strings”, the table defines separate files, where translations are stored. When using them avoid to have the same “Table”-name than a Storyboard- or XIB-Name as these files also use their name with a .strings-extension

Bundle (not yet supported in AppTranslate)

If you are having several bundles in your project, you can specify the right one here

DefaultValue (not yet supported in AppTranslate

This parameter offers the possibility to supply the translation for the base-language separately from the key. Even though this is an interesting feature if you decide to keep all information inside the code. On the other hand this feature is not available in most other languages and the code needs to be changed to change a translation. This is against keeping code and translation separate. This is probably the reason why it seems not to be used often in development and the reason not to be supported in AppTranslate at the moment as well.