%BOOK_ENTITIES; ]>
Translating &PRODUCT; Documentation Now that you know how to build the documentation with Publican, let's move on to building it in different languages. Publican helps us build the documentation in various languages by using Portable Object Template (POT) files and Portable Objects (PO) files for each language. The POT files are generated by parsing all the DocBook files in the language of origin, en-US for us, and creating a long list of strings for each file that needs to be translated. The translation can be done by hand directly in the PO files of each target language or via the transifex service. Transifex is a free service to help translate documents and organize distributed teams of translators. Anyone interested in helping with the translation should get an account on Transifex Three &PRODUCT; projects exist on Transifex. It is recommended to tour those projects to become familiar with Transifex: https://www.transifex.com/projects/p/ACS_DOCS/ https://www.transifex.com/projects/p/ACS_Runbook/ https://www.transifex.com/projects/p/CloudStackUI/ The pot directory should already exist in the source tree. If you want to build an up to date translation, you might have to update it to include any pot file that was not previously generated. To register new resources on transifex, you will need to be an admin of the transifex &PRODUCT; site. Send an email to the developer list if you want access. First we need to generate the .pot files for all the DocBook xml files needed for a particular guide. This is well explained at the publican website in a section on how to prepare a document for translation. The basic command to execute to build the pot files for the developer guide is: publican update_pot --config=publican-devguide.cfg This will create a pot directory with pot files in it, one for each corresponding xml files needed to build the guide. Once generated, all pots files need to be configured for translation using transifex this is best done by using the transifex client that you can install with the following command (For RHEL and its derivatives): yum install transifex-client The transifex client is also available via PyPi and you can install it like this: easy_install transifex-client Once you have installed the transifex client you can run the settx.sh script in the docs directory. This will create the .tx/config file used by transifex to push and pull all translation strings. All the resource files need to be uploaded to transifex, this is done with the transifex client like so: tx push -s Once the translators have completed translation of the documentation, the translated strings can be pulled from transifex like so: tx pull -a If you wish to push specific resource files or pull specific languages translation strings, you can do so with the transifex client. A complete documentation of the client is available on the client website When you pull new translation strings a directory will be created corresponding to the language of the translation. This directory will contain PO files that will be used by Publican to create the documentation in that specific language. For example assuming that you pull the French translation whose language code is fr-FR, you will build the documentation with publican: publican build --config=publican-devguide.cfg --formats=html --langs=fr-FR Some languages like Chinese or Japanese will not render well in pdf format and html should be used.