An important topic for users, site administrators and developers.
Internationalization (i18n) is about making software (and websites) localizable - able to display their user interface and content in multiple languages, character sets, number and date formats, etc.
Localization (l10n) is about actually adapting a piece of internationalized software to a particular locale (language, country). Sometimes just "internationalization" is used to refer to both i18n & l10n.
A basic part of i18n is being able to support international characters, namely Unicode support.
Zope 3 is fully internationalized. Zope 2 is not (eg the ZMI), but it provides good i18n support for products and many of these are internationalized.
How Zope i18n/l10n works
As of mid-2004, it boils down to this:
product developers do i18n
- add i18n tags to your python code (
_("string")) and to your page templates (i18n:domain/i18n:translate/etc.). Cf HowToInternationaliseWithPTS. - extract all the marked strings into a .pot file (the message
catalog). Repeat whenever product code changes. There are two extraction
tools used in the zope world:
- Zope 3's i18nextract, which with some patches works very well for Zope 2 code.
- i18ndude
- update all language-specific .po files in PRODUCTDIR/i18n/ with the latest data from the .pot file. Repeat whenever the latter changes, and also after receiving a new po file from a translator. Developer and translator changes are magically merged here. This is usually done with the [msgmerge]? command.
translators do l10n
- update translations in po files, using kbabel, emacs pot mode, or ordinary text editor. Repeat whenever po files are updated by the above step.
site administrators configure zope and sites
- Install appropriate InternationalizationProducts - eg PlacelessTranslationService and PloneLanguageTool, or Localizer and TranslationService.
- Ensure there has been sufficient i18n and l10n of skin and content objects, both standard and customized, be they from CMF, Plone, CPS or non-CMF, and that all necessary po files are installed on the filesystem
- Make sure PTS or Localizer can find and load the translated .po files
- Make sure the site and any mail-outs are providing the proper character encoding hints
- Set up a language selection UI, or automatic language selection
users configure browser, use site
- visit site, perhaps also configure browser language, perhaps also select site language option
- enjoy
Resources
- http://plone.org/development/teams/i18n/translators-guidelines
- I18N and MySite? - very nice plone-oriented overview & how-to
- PlacelessTranslationService - important i18n product
- HowToInternationaliseWithPTS - developer tips
- Re: docs content - good overview from Raphael Ritz, 2004/06
- Plone i18n team - good collection of docs for plone and zope developers and translators. Highlights:
- InternationalizationProducts -- overview of i18n-related zope products
- ZWiki:UnicodeTerminologyNote -- definition of unicode, utf-8, utf-16
- Structured Text i18n patch -- allows utf8-encoded characters in structured text formatting rules
- Unicode in Zope 2 (ZMI, Archetypes, Plone, Formulator) -- great summary of zope 2 unicode status
- Zope 2.6 Unicode Changes
- W3C i18n guidelines
- Mozilla i18n/l10n page
- The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
- George Donnelly's Localizing Plone talk
- [Zope 3]:Zope3Internationalization
- ZopeThreeWiki:ZPTInternationalizationSupport
- ZopeThreeWiki:I18nIntroduction
- ZopeThreeWiki:I18nAndL10nInComponents
- ZopeThreeWiki:ZPTInternationalizationExamples
- ZopeThreeWiki:HowToDoI18nAndL10nForZope3
- ZWiki:Chapter26Internationalisation
- how to i18n python code ?
- http://zopezone.com/discussions/zope3/00000002 - PTS python code i18n example
- http://zopezone.com/discussions/zope3/00000002
- i18n, unicode, and the underline
- Unicode in Zope 2 (ZMI, Archetypes, Plone, Formulator)
- Zope 2.6 Unicode Changes
- Plone, the RTL way - right-to-left tips
- plone-i18n files and i18ndude - see CodeRepositories
- http://mail.python.org/pipermail/python-dev/2000-April/003766.html - python developers on character encoding issues
- Martijn Faassen on Changing the Python default encoding considered harmful
talgettext.py -- Tue, 03 Aug 2004 09:02:02 -0700 reply
Zope 2.7.2 includes a script talgettext.py in lib/python/TAL that can be used to extract the i18n msgid
from PageTemplate?.
Usage: PYTHONPATH=/your/zope/lib/python python2.3 /your/zopelib/python/TAL/talgettext.py -o product.pot [-u]? *.pt
It can only be used for HTML page template. The -u option is used to update an existing PO file.
i18n newbie problems, and willing to document. -- Fri, 06 Aug 2004 00:31:24 -0700 reply
Kind people,
i'm trying to get a grasp on i18n and Archetypes i've made some documentation as i go along. Because i'm gratefull Plone is there and because i'm very annoyed at the lack of documentation. Here is some: http://plone.members.bnet.nl/ForAdmins/i18n_archetypes.htm
I'm confused as to the basic steps i should make (see the end of that page). I can find documentation nowhere ! Can anyone point me to some documentation ? For example where is explained what a .po a .pot and a .mo file is. As a first step; if i make them by hand (which i want to do first) what are the rules ? Oh... to see that i do look around (before posting here) you can see my own list of links that are Plone related over here: http://plone.members.bnet.nl/CMSLinks.htm Once i know how to i'm willing to document it (more) decently and publish it.
Regards, Ad Weterings (Ad at Weterings dot org)