Very often a client may need to add a new language to his control panel and translate the panel. This article walks you through the steps you need to perform to add a new language, let's say Swedish, into ISPmanager.

Note

The described method cannot be applied to the BILLmanager 6 interface.

How to add my language?


In order to add a new language into the language selection field, create the /usr/local/mgr5/etc/xml/ispmgr_msg_sv.xml file with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<mgrdata>
<lang name="sv">
</lang>
</mgrdata>
BASH

Where sv is a value corresponding to the desired language.

To make your language to be displayed in a control panel, add the /usr/local/mgr5/etc/xml/core_mod_sv.xml file with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<mgrdata>
<lang name="en">
       <messages name="label_langs">
       <msg name="sv">Svenska</msg>
       </messages>
</lang>
</mgrdata>
BASH

Where Svenska is a language name.

After you have added two languages, restart the panel with the following command:

killall core
BASH

Therefore, you will be able to choose the Swedish language in the ISPmanager login form and language selection field in the "User settings" form.

How to choose a language


You can add a new language into any other ISPsystem's control panel in the same way. The only difference is that the ispmgr_msg_<language>.xml file should be named according to a control panel's name. E.g. file in BILLmanager - billmgr_msg__<language>.xml, file in VMmanager - vmmgr_msg__<language>.xml, etc.

How to translate a panel into my language?


After you have added a new language, you can translate the panel.

Let's consider one more example of translating your panel into the Swedish language.

Take the English file ispmgr_msg_en.xml and copy it.

cp /usr/local/mgr5/etc/xml/ispmgr_msg_en.xml /usr/local/mgr5/etc/xml/ispmgr_msg_sv.xml
BASH

In the new file ispmgr_msg_sv.xml change <lang name="en"> into <lang name="sv">.

Thus, we have the Swedish language will with all the messages used in the control panel. You will only need to translate the messages in the file from English into Swedish.

Restart the panel to apply the changes.