Overview
All the strings (phrases) which appear in the ProcessMaker interface can be easily altered to fit the needs of your organization. The easiest way to change an interface string is to edit the PO translation file for a particular language and then import the edited PO file into ProcessMaker. It is also possible to change some interface strings by updating records in the ProcessMaker database.
Altering Interface Strings
Interface strings for each language can be altered either by editing the PO translation file for a particular language or by altering the strings in the database.
Editing the PO Translation File
Export the PO translation file for a particular language from ProcessMaker and edit its translation strings. When done editing the PO translation file, reimport it into ProcessMaker. For more information, see Updating an Existing Translation.
Altering Translation Strings in the Database
Enter MySQL and switch to the wf_<WORKSPACE> database. For example, if using the wf_workflow database:
Then, search for the ID for the translation string:
If unable to find the string, try searching with LIKE and case insensitivity:
After finding the string's ID in the TRN_ID field, then use an UPDATE statement to set a new string:
For example, to change the Spanish translation of "Next Step" from "Próximo Paso" to "Próximo":
Note: These changes will be overwritten each time a new translation file is imported into ProcessMaker for that language, so these interface strings will have to be updated after each import.
Adding New Strings to the Interface
New strings can be added to the ProcessMaker interface, which can be useful if modifying the ProcessMaker source code or needing to use these strings in triggers or plugins.
The advantage of adding a new interface string to ProcessMaker is that translations can be added for that string and it can be used by the G::LoadTranslation() function to automatically return the correct translation for the current system language.
For example, if a new interface string has been created named "ID_ADD_INVOICE", then it could be used in a trigger:
As long as translations have been added for ID_ADD_INVOICE, then each user will see the message in his/her language.
Adding New English Strings
After logging into ProcessMaker as the "admin" user, then edit the URL in the web browser to redirect to the Translations page:
- http://<IP-ADDRESS>/sys<WORKFLOW>/en/<SKIN>/tools/translations
For example:
- http://localhost/sysworkflow/en/classic/tools/translations
Then, go to TRANSLATIONS > ADD FIELD and define a new interface string.
Enter values for the following fields:
- Category: Select whether the new string will be used as:
- Label - The string will be used inside a trigger, menu, or normal interface dialog box. Select this option in most cases.
- Javascript - The string will be used in a DynaForm or any form which is generated from XML code.
- Id: Create a unique combination of ASCII letters, numbers and/or underscores to identify the new interface string. It is recommended to only use uppercase letters in the ID and avoid using spaces, symbols or international characters.
- Value: Enter the English string.
To submit the new string, click on Save.
Then, update the translation files by going to Translations > Rebuild.
Adding Translations
After adding a new ID and its English string, then translations can be added for that interface string. See Altering Non-English Interface Strings.
Altering Interface Strings in the Database
Most interface strings used in ProcessMaker are stored in the wf_<WORKSPACE>.TRANSLATION table under an ID (such as "ID_CASE_HISTORY" and "CONDITIONAL_ALERT1") and an ISO language code (such as "en" for English and "zh-TW" for Chinese from Taiwan). English interface strings can be added or altered directly in the ProcessMaker interface, whereas non-English interface strings require editing the PO translation file.
In order to alter an English string, first find its ID. Login to ProcessMaker as the "admin" user, then edit the URL in the web browser to redirect to the tools/translations page:
- http://<IP-ADDRESS>/sys<WORKFLOW>/en/<SKIN>/tools/translations
For example:
- http://localhost/sysworkflow/en/classic/tools/translations
To find the ID for a string, enter the string into the Search box and press ENTER. To change a string, click on its Edit link for that string and enter a new value for it.
When done editing the string, click on Save. Finally, click on the Rebuild List submenu to update the list of interface strings in ProcessMaker:
Finally, refresh your web browser by pressing CTL+R or CTL+F5 so the new interface string will be loaded in ProcessMaker.
Note: These changes will be overwritten each time ProcessMaker is upgraded to a new version, so the interface strings will have to be re-edited after each upgrade.