home contents changes options help subscribe edit (external edit)

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:
    1. Zope 3's i18nextract, which with some patches works very well for Zope 2 code.
    2. 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

users configure browser, use site

  • visit site, perhaps also configure browser language, perhaps also select site language option
  • enjoy

Resources


comments:

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)



subject:
  ( 28 subscribers )