iLocalize introduction
iLocalize is a localization tool (http://www.ilocalize.com/ilocalize/). Like AppleGlot, it's basically an interface for nibtool/ibtool, but it has several advantages, compared to AppleGlot, not requiring an external strings editor and having a nice UI for trivial tasks like importing a localized package or updating the source package.
If you localize open-source software (like Camino), you can use it without paying, by acquiring a free license: http://www.ilocalize.com/ilocalize/download.html
iLocalize requires Mac OS X 10.4 and, of course, XCode installed.
In this page, we look at the initial set-up and at the basics to get started. Detailed instructions provided by Igor Pryadkin.
1. Create a new project:
- Use the latest Camino MultiLanguage distribution as the package to be imported
- Check "Create non-existing localized file(s) from base language" option
- Check "Leopard and previous version" compatibility option
- In the following screen, select "English" ("en") and your language (setting "English" ("en") as base language)
- If you find ISO ("ru" in my case) and legacy ("Russian" in my case) designation for your language, select both.
The problem is that the last iLocalize version doesn't make difference between ISO and Legacy names and creates by default a Legacy ("Russian" in my case) .lproj folder when exporting even if you set an ISO ("ru" in my case) designation for your language in project.
2. Preferences
In "General" pane:
- Check all the items in "Automatic actions", and "Display", if not checked
In "Localization" pane:
- Check "Validate string on user input" and "Flag updated files after update operation", if not checked
- Uncheck "Propagate to similar items" if checked (this is a suggestion for the first times you use the software then, if you find it useful you can activate this option)
- Check "Select next string after translating", if not checked
- Check "Translate only if different from base string", if not checked
- Uncheck "Fill translation with base language", if checked
- Check "Read-only" for Base language
- Check "No" for "Translation propagation" (again, initial suggestion then, if you find it useful you can set to "All files" or "Selected files")
- Check "Translate only if string is not translated" for "Automatic translation" (initial suggestion then, if you find it useful you can set to "Always translate");
- Check "Update base language" or "None" for "Default Update Selection"
3. Check your project for incompatibilities, issues, etc.
Menu "Project" > "Check" item. In our case you'll find 2 issues (duplicate keys) in "Talkback" strings, that we can ignore for a moment.
4. Find out how much work is to be done
If you have untranslated strings for your language (0% ... 99%) indicates the percentage of translated string, if there's no % sign, your language is fully translated or (pay attention!) filled up with base language. To avoid it, I suggest not to check "Fill translation with base language" box, if checked in Preferences and to review your language.
5. Create your language Glossary
- Menu "Glossary" > "New Glossary"
- Path: personally, I prefer "Global". You will then find it in ~/Library/Application Support/iLocalize/Glossaries
- Check "Language" for "Scope"
- Check "English" or "en" for "Source"
- Check your language for "Translation"
- Check box for "Translated" and leave others unchecked
- Save your new glossary
You may also import Apple's glossaries from Mac OS X (http://developer.apple.com/internationalization/download/) for your language and place them in ~/Library/Application Support/iLocalize/Glossaries. Then, open the menu item "Glossary" > "Manage Glossaries". You'll see all the .ad glossaries, and you can leave them as they are or merge .ad glossaries in one .ilg glossary.
After that, you can save and close you project.
When you want to update your project:
1. Import the updated source package
- Download the latest Camino build
- Mount the dmg
- Start iLocalize
- Open the Camino project you saved before
- Select "Update from bundle" from the "Project" menu
- Check "Update the project from a new version of the bundle" and select the path to the mounted dmg
- DON'T check the box "Reset the layout of each localized nib file from its base-language layout". Otherwise, all changes you made previously will be lost.
- Don't check the box "Update the localized languages of the project from bundle"
After the update all the updated files will be labeled as "updated" and you'll see a strings percentage to be translated, when you switch to your language.
2. Open "New glossary inspector" in the "Window" menu.
If there's a string that was previously translated, you'll see it in the Glossary window and use it. If you are sure that the same translation is used for similar strings, you can propagate it (Ctrl+click > "Propagate translation to identical strings in all files" or Option+F4)
3. Work on new and updated strings
- Click the "To translate" filter (filters look like Smart Folders in the left upper pane of the iLocalize window)
- Translate strings to be translated.
- Click the "To check" filter and check automatically filled pairs (select and press F1 to approve or Ctrl+click to open a contextual menu)
- In order to approve changes to .nib files, press F2
4. IMPORTANT!!! You should rebuild from English all the updated .nib files (marked with the "updated" label)
- Select each .nib file
- Ctrl+click to open the contextual menu
- Select "Rebuild from 'en' o 'English'"
- DON'T check the box "Keep existing nib layouts", because usualy updated English .nib files have also an updated layout: you should copy the new layout and manually tweak the localized layout again, if needed.
To open .nib files in Interface Builder after rebuilding, just double click on them.
5. Final clean-up
- If your modified .strings files have another encoding than English ones, Ctrl+click on it, and select "Encoding of English file" then save.
- After work is done, clear updated file symbols (Ctrl+click > "Clear updated file symbols" or F6) in both English and your language.
- Close the Glossary window, then create a new glossary and save it in order to save changes.
6. Creation of the localized application
Go to the "Application" menu (not the "iLocalize" menu, the one named "Application") and choose to generate your app.
In the resulting window check the "en", "your language" and "Optimize" boxes.
IMPORTANT!!! DON'T check the "Compact nib files" box, otherwise they will become read-only and will not be useful for further work.
Save the project and quit iLocalize. You can run your Camino.
Remember! If you browse the Camino package now, you will find that your language .lproj folder ("Russian" in my case) has a legacy designation, even if you worked with ISO designation ("ru" in my case). You may leave it this way (Mac OS X will recognize it, anyway) or rename all [Legacy].lproj to [ISO].lproj. You may do so using the "Project" > "Rename 'xx'…" menu command to rename your language to anything ("blah" for example) and then back to the desired string ("ru").

Comments
As I mentioned in a post on
As I mentioned in a post on the email list, you don't need to rename the .lproj-folders manually, just use the "Rename 'xx'…" menu command to rename your language to anything ("blah" for example) and then back to the desired string ("ru").
Any occurences of language codes, whether it's ISO ("ru") or legacy ("Russian") should be put in quotation marks in this post, to avoid confusion.
Page, updated. Thanks,
Page updated. Thanks, alimony