Personal tools
You are here: Home Weblog Archive 2006 October 06 Internationalization with Plone
Document Actions
  • Send this page to somebody
  • Print this page
  • Add Bookmarklet

Internationalization with Plone

by tibi last modified 2006-10-06 11:31
Filed Under:

To generate automatically a .pot file necessary for translating msgids inside template files you need to get i18ndude (really easy since it was placed in cheeseshop):

sudo easy_install i18ndude

Since I'm using ArchGenXML, I already have a generated.pot file created. I've renamed this file to old.pot and ran this (in the i18n folder):

i18ndude rebuild-pot --pot ./generated.pot --merge old.pot --create MyProduct ./../skins/MyProduct/

This command builds a pot file by looking at files in the skins folder and merging the extracted msgids with the ones in old.pot. Of course, the templates need to have the i18n:translate entries inside in order to be recognized by i18ndude. Now that I have the pot file, I can use KBabel to create the translated .po files. Only thing left to do is make sure my templates use the MyProduct i18n domain. To load the catalog I needed to restart zope. If the wrong catalog is loaded, delete the catalog from the Zope Control Panel > PlacelessTranslation service and the .mo file from the <zope_instance>/var/pts, after which zope has to be restarted.

The rest of the internationalization (translated content) is beautifully covered by LinguaPlone.

Weblog
Atom
RDF
RSS 2.0
Powered by Quills
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: