Internationalization for iOS
iOS iphone SDK internationalization
MainWindow.xib
es en fr
To add different language nibs, follow this steps:
- Add the resource file to Xcode:
- Expand your project in the Groups & Files pane.
- Select the Resources folder.
- Choose Project > Add to Project….
- Use the file browser to navigate to the resource, select it, and click Open.
- In the dialog that Xcode displays, select “Copy items into destination group’s folder”, choose one of the “relative” reference styles (for example, “Relative to Project”), and select the desired target. Click Add.
- Select the resource file and open the Inspector window (File > Get Info).
- If the file is not already localizable, click the Make File Localizable button in the General tab of the Inspector window.
- In the General pane again, click the Add Localization button. In the sheet that appears, select or type the locale you want to add. Xcode copies the resource to the other .lproj directory.
If your resource file is a plain text file, you should be sure to set the File Encoding for each localized copy. You can set the default localization of the file before you make the file localizable. You can use different encodings for different localized versions of the file. To set the encoding for a specific localization, choose that localization in the Groups and Files pane and change the setting in the Inspector window. The language identifiers for each localized nib are ISO names, like (es,en, es_es, es_pu, en_us, etc)
Preparing Your Nib Files for Localization
Language and Locale Designations