You must first sign up to be able to contribute.

How to use I18N with gettext

  • set source in your i18n.yml file to gettext:
      default_culture: en
      source: gettext
  • enabled i18n in settings.yml
        i18n: on
  • place the I18nSaverFilter class from #253 in your <appdir>/lib directory
  • active the filter in <appdir>/config/filters.yml:
      class: I18nSaverFilter
  • create a directory in <appdir>/i18n for each language you want to translate to
  • create message.po, in this directory i.e.
    cd de
    touch messages.po
  • make them writeable by the webserver (the I18nSaverFilter will write untranslated string to this files while you browse your website):
    chmod 777 messages.po
  • translate the .po files (i.e. with, but there are loads of other tools)
  • update files with
    msgfmt messages.po
  • i18n.yml is deprecated. please use factories.yml.