Internationalization

Translate the Cloud Management Platform (CMP) interface into a language other than English

CMP ships with English only. Translating it consists of generating message files from the strings marked in the product, translating those files, compiling them, and then telling CMP which language to serve. This is carried out on the appliance, and the files are stored in the proserv directory where they will not be overwritten during an upgrade.

Generate the message files

Run these commands on the appliance. Replace fr with your target language code from the ISO 639-1 list.

sudo su -
cd /opt/cloudbolt
mkdir locale
./manage.py makemessages -l fr --keyword=_lazy

Text rendered by JavaScript lives in another catalog. Generate it to translate those strings:

./manage.py makemessages -d djangojs -l fr -i node_modules -i docs

Copy the locale directory into proserv:

cp -R locale/ /var/opt/cloudbolt/proserv/

Translate the files

Edit django.po and djangojs.po in the language directory you created in proserv. Each entry pairs the English string with an empty translation:

msgid "Edit this blueprint item"
msgstr ""

Fill in msgstr for each msgid. An empty entry falls back to English.

Compile and switch language

  1. Compile the files:

    /opt/cloudbolt/manage.py compilemessages
    
  2. Add the language code to /var/opt/cloudbolt/proserv/customer_settings.py. Use the lowercase form, such as LANGUAGE_CODE = "fr" or LANGUAGE_CODE = "pt-br".

  3. Restart Apache: systemctl restart httpd.

If the interface is still in English, check for a catalog generated without --keyword=_lazy, files compiled outside proserv, or a language code that does not match the directory name. The directory uses an underscore, as in pt_BR, while the setting uses lowercase and a hyphen, as in pt-br.

What the catalogs do not cover

Message files translate the text built into the product. They do not touch objects such as parameters, actions, roles, blueprints, and groups. Those carry their own labels and descriptions, so translate them by editing each object in the UI.