The text in ProcessMaker can be changed from the default language (English) to the language of your choice, even if that language is not yet available, by manually creating a translation file. This wiki page will teach users how to translate ProcessMaker labels and Dynaforms using two methods.
Creating Your Own Translation File
ProcessMaker accepts .po files. It is possible to use any po program, or a plain text editor such as Notepad++ or UltraEdit for Windows and vim or gedit for Linux, to create your translations. To check po file structure it is recommended to use PO Edit; remember that the file has to be encoded in UTF-8 as well as the plain text editor used.
Translating with a Plain Text Editor
a. You can download the .po file once ProcessMaker is installed by either going to Admin >Settings >Language.
or by downloading the version of the English translation file that matches your version of ProcessMaker. An English translation file must be used as a reference to create or update another language, since all of the labels in ProcessMaker originate in English and the English files have the correct labels for your version of ProcessMaker.
b. Then create a file in any plain text editor. Add a header, which can be copied from the original one, and change it to the language of your file. For example, if you are creating a Spanish language translation file, the header will be:
"Project-Id-Version: ProcessMaker 3.0-RC4-community\n"
"PO-Revision-Date: 2016-03-08 12:48:33\n"
"Language-Team: Colosa Developers Team <email@example.com>\n"
"Content-Type: text/plain; charset=utf-8\n"
c. You can copy all the content of the original file and translate the msgstr strings.
Then translate the msgstr strings:
msgid "End of process"
msgstr "Fin del proceso"
msgid "Leaf task"
msgstr "tarea de hoja"
Do NOT change the string for the msgid because this is the ID of the label. Make sure that each msgstr is enclosed in double quotes. To use a double quotation mark within a string, precede it with a backslash \" .
Using PO Editor
Download POedit and install it. Then open the file processmaker.en.po with PoEdit.
First edit the header information for the PO file. Go to Catalog > Properties or press Alt+Enter:
Change the Language from English to your language. Also add your name and address so people can contact you with revisions and updates about the translation. Set the character set to UTF-8.
PoEdit displays a list of the phrases to translate at the top. Select a phrase to translate. In the top box the original English phrase to translate is displayed, and in the bottom box the translation is displayed. In the translation window, translate the phrase from English to your language.
Press the down key to switch between the list of phrases and the translation box for each phrase. It is also a good idea to check the translator comments window to see if there are any translator comments left by a previous translator. \. Show the window for automatic translator comments by activating the option under View > Show automatic translator comments.
Phrases highlighted in yellow are marked as "fuzzy", which means that the original phrase in the software has changed, so the phrase needs to be retranslated. If you are unsure how to translate a phrase, it is better to leave it blank rather than use an incorrect translation. Another option is to do a preliminary translation of a phrase, but indicate that the phrase needs to be reviewed in the future by clicking the "fuzzy" icon in the toolbar. This will indicate to the next translator that the translation needs to be reviewed. A comment can also be left for the next translator by going to Edit > Edit Comment.
When done, save the file as processmaker.<LANG>.po, where <LANG> is the 2 letter 639-1 ISO language code.
Adding a New Translation
To add a new translation, log in to ProcessMaker as the admin user (or any other user with PM_SETUP_ADVANCE in their role), go to ADMIN > Settings > LANGUAGES and click on Install/Update. A window will open. Click on the folder icon to search for the .po file in the local computer.
At the next login, the language should be available for use.
Improving Existing Languages
ProcessMaker gives users the possibility to merge languages automatically, meaning that if for some reason IDs or new labels were added to the English language file, the new IDs or labels will be added, in English, to another language's .po file.
When a language needs to be updated, upload it to ProcessMaker and then export it. After the translation is downloaded from ProcessMaker, all new labels and new ID's will be added; however, they won't be translated into the language itself.
Recommendations While Editing a Language
- Both translation files must be correctly merged, and the ID's and msgid must be the same, otherwise some labels may not be displayed correctly when the language is uploaded to ProcessMaker.
- It is good practice to translate in small sections, then save the file and upload it to ProcessMaker to check errors that may appear.
- When a language is uploaded to ProcessMaker, clear the browser and ProcessMaker cache to correctly implement the changes.
Editing Translation Files
Follow the steps below to compare files and correct some possible errors that may appear:
1. Download the version of the English translation file for your installation of ProcessMaker. The English file must be used to as a reference to create or update another translation since the English file contains all the correct and updated labels. You can download it once ProcessMaker is installed by going either to Admin >Settings >Language, choosing the English file and clicking on Export, or from the ProcessMaker SourceForge page.
2. Change the extension of the file downloaded from processmaker.en.po to processmaker.pot. .pot files are templates needed to compare between the original translation file and the new one to look for obsolete and new labels to be updated.
3. Open Poedit and open the file to be translated, then go to CATALOGUE> Update From POT File:
4. All labels in both files will be compared and the new and obsolete strings will be displayed in the window below:
5. Open your translation file (using a plain text editor mentioned before), look in the translation file for the strings listed in the window and fix them. Make sure not to save the file in Poedit because some of the characters used will corrupt your file if it is not well configured. Change and add strings to the file. Once you finish, repeat the step 3 until the file doesn’t have any errors.
Translating Dynaform Labels
As mentioned in this documentation, it is not possible to design multi-lingual processes; however, Dynaform labels can be multi-lingual depending on the languages imported to ProcessMaker.
For instance, to have versions of the Dynaform in English or Spanish, just make sure the Spanish translation file was properly imported to ProcessMaker.
Then, go to the XML of the Dynaform, and make sure that the label is enclosed inside the
<en> </en> tags, which means it is using the English label.
To translate the labels into Spanish, enclose the label that was previously translated to Spanish in
<es> </es> tags:
When using the English language, the form will look like the image below:
After switching the language to Spanish, the Dynaform will use the labels translated into Spanish.
Where Do I Send My Translations?
If you would like to include your translation in ProcessMaker, please email the .po file as an attachment to communityATprocessmakerDOTcom , with [processmaker.en.po] (change en for the corresponding language you are sending) as the first word in the subject line. If you would like your name to be listed on the translation credits page, please let us know in the email.
Thank you for your help with translations!