You are here: Home Members jhb i18n and plone
Personal tools

i18n and plone

— filed under: ,

How to do i18n related tasks in plone

A little i18n cookbook

 

  • Build a pot file
    ~/projects/piraten/opinion/bin/i18ndude rebuild-pot --pot locales/Products.opinions.pot --create Products.opinions .
  • Copy the files to
    locales/de/LC_MESSAGES/Products.opinions.po
    files
  • Get them translated, using poedit, which when saving will create .mo files
  • Activate the translations in the products configure.zcml file
    <configure
        xmlns="http://namespaces.zope.org/zope"
        xmlns:five="http://namespaces.zope.org/five"
        xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
        i18n_domain="Products.opinions"
        xmlns:i18n="http://namespaces.zope.org/i18n"
        >
        <i18n:registerTranslations directory="locales"/>
    ...
  • Merge in new translations by a) rebuilding the pot file, and b)
     ~/projects/piraten/opinion/bin/i18ndude sync --pot locales/Products.opinions.pot locales/*/LC_MESSAGES.Products.opinions.po

Document Actions