This article describes how to add a new language to the platform. Swedish is taken as an example.
How to add a language to the platform
- To make a new language appear in the language selection field, create the /usr/local/mgr5/etc/xml/billmgr_msg_<sv>.xml file with the following content:
File content<mgrdata> <lang name="sv"> </lang> </mgrdata>
Comments - To display the language name in the platform, create the /usr/local/mgr5/etc/xml/core_mod_sv.xml file with the following content:
File content<mgrdata> <lang name="en"> <messages name="label_langs"> <msg name="sv">Svenska</msg> </messages> </lang> </mgrdata>
Comments - After both files have been added, restart the command platform:
killall core
In the platform, you will be able to select the Swedish language:
- on the authorization page;
- on the page for changing the user's language.
How to translate the platform interface
Once the new language is added, you can translate the platform interface into that language.
-
Take the English message file billmgr_msg _en.xml as a base and copy it:
cp /usr/local/mgr5/etc/xml/billmgr_msg _en.xml /usr/local/mgr5/etc/xml/billmgr_msg_<sv>.xml
Comments - In the new file billmgr_msg _sv.xml change <lang name="en"> to <lang name="sv">. You will get a file for the Swedish language, which already has all possible platform messages.
- Translate the messages in the file from English to Swedish.
-
For the changes to take effect, restart the platform:
killall core
Useful tips
Related articles: