Handling i18n translation files with ArchGenXML and i18ndude

How to use i18ndude in combination with ArchGenXML

The file i18n/generated.pot contains the translations that archgenxml itself is trying to extract from its own python files. You should download i18ndude and perform the following things:

  • extract i18n info from your page templates (into yourproduct.pot).
  • merge the generated.pot into yourproduct.pot.
  • sync yourproduct.pot with yourproduct-de.po.

Note that you've got to take care with the upper/lowercase names for your i18n domain, so check both your templates and your .po/.pot files.

Code examples

Extracting and merging:

i18ndude rebuild-pot --pot i18n/${PRODUCT}.pot --create ${PRODUCT} \
    --merge i18n/generated.pot skins/$PRODUCT/*.pt

Syncing:

i18ndude sync --pot i18n/${PRODUCT}.pot i18n/${PRODUCT}-nl.po \
    i18n/${PRODUCT}-en.po

i18ndude setup on Windows

Posted by Tom Elliott at Nov 15, 2006 10:09 PM
The i18ndude installer puts an i18ndude.exe file in the Scripts subdirectory of your python installation. You must put this directory (e.g., c:\Python24\Scripts) in your Windows PATH environment variable in order for ArchGenXML to be able to find i18ndude.

Fix some errors - windows

Posted by Diego Municio at Mar 09, 2007 10:52 AM
If you are using Windows installer, you must change i18ndude script (C:\Python24\Scripts\i18ndude-script.py):
Replace the following line:
#!C:\python\python24\python.exe
with your python path, mine was:
#!C:\python24\python.exe

Then another error appears:
no module named pkg_resources
Fix it by installing setuptools (http://cheeseshop.python.org/pypi/setuptools).

Warning: i18ndude can break Plone installations!

Posted by Rene Fleschenberg at Feb 18, 2009 03:27 PM
If you need to install i18ndude, install it in a VirtualEnv. Otherwise, it might break your Plone installation, at least at the moment. See: https://weblion.psu.edu/[…]/Internationalization

Thanks

Posted by Leonardo Caballero at May 12, 2009 08:15 PM
Hi Reinout

Thanks you for this "how to" it's very usefull

See you around ;)