Automated translation

http://www.symfony-project.org/askeet/1_0/en/23

Automated translation

Some tools exist to automate the task of enclosing source text and creating messages.xx.xml files. Unfortunately, none will be able to do the enclosing as well as you would do. Only you can determine where to start and where to end the __() call. Although we don’t use them, we provide a link to the websites where you will find resources about automated translation tools:

  • The xgettext command from the GNU getText tool provides a way to extract text from PHP code. It produces a .pot file (list of the terms) that can be declined into a series of .po files (list of the terms translated in one language).
  • The po2xliff command from the XLIFF tools turns .po files into messages.xx.xml XLIFF files.
  • For Windows users, the Okapi framework can be a good alternative.
  • To edit the translation files, poedit proposes an intuitive interface (this is especially useful since most of the human translators don’t understand either XML or .po files).