This Document Is the official documentation for Internationalization. Good, dry reading.
These 3 steps are all I needed to do:
1) Convert XIB files:
- Internationalize XIB files. Select the XIB file in XCode, click the info button, and under general press 'Make Localized'
- Extract strings: ibtool -L MainWindow.xib > ./MainWindow.strings
- Translate: See Post below!
- Re-create new XIB File:ibtool -d de.lproj/MainMenu.strings English.lproj/MainMenu.nib -W French.lproj/MainMenu.nib
2) Use NSLocalizedString wherever you have a user-visible string to display
- Modify Code to use NSLocalizedString
- Generate a Localized.strings file auto-matically with: genstrings -o t1 *.m
This tool is very cool, it actually parses your code and looks for where you use NSLocalizedString and it generates your key/value pairs from the code!
- Translate and copy Localized.strings into the .lproj directories
3) Use the Localized interfaces on any API objects you have.
- For me, the only object was the NSNumberConverter. I was using a direct number converter, and I realized that it took care of things for all locales even easier!
formatter = [[NSNumberFormatter alloc] init];
[formatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[formatter setLocale:[NSLocale currentLocale]];
I applaud Apple in their toolchain. It's great that I can develop great user-friendly Apps in a developer-friendly environment!
Anyone else have any Internationalization Tips?