This page is now obsolete
see
InternationalizationProject for the latest i18n information
Internationalizing Your Parcel
Internationalization -- making the code easy to customize for a given locale -- involves
many elements.
One important piece is separating displayed text from code.
We have not yet figured out how we are doing the other pieces. Stay tuned.
Separating displayed text from code
The way we handle separating displayed text from code is to use a method named
gettext, which is aliased to "_" to save keystrokes.
When python encounters
_('
text') or _("
text"),
the "_" method will use either
text or the appropriate alternative for the current locale. (More on how to set a locale later. @@@)
If there is no alternative for
text in the appropriate language,
text will be used.
You do not need to worry about doing anything special to text that appears in your XRC file. Display text in your XRC file will automatically be examined for appropriate alternatives.
Localizing is more complicated -- the files that store the localized strings are kept centrally for Chandler, which means that OSAF needs to keep control of them. For the gritty details of how this is done, see
DisplayTextI18N. Because letting people import parcels is important to OSAF, at some point Chandler will probably have to decentralize the localization strings, but OSAF isn't there yet.
External Resources
- Python
- wxWindows
- Mozilla
- Open source i18n projects: