# Internationalization

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

---

Site [llms.txt](/llms.txt)

---

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](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).

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

<div class="alert alert-warning" role="alert">


Include `--keyword=_lazy`, as CMP marks most of its interface text with `_lazy`. Without that keyword, those strings are omitted, producing a catalog with missing translations.
</div>


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

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

Copy the `locale` directory into `proserv`:

```bash
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:

```text
msgid "Edit this blueprint item"
msgstr ""
```

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

<div class="alert alert-info" role="alert">


Before compiling, check the `Plural-Forms` line in the file header. If it still reads `nplurals=INTEGER; plural=EXPRESSION;`, the placeholder that the generator writes, replace it with a real rule such as `nplurals=2; plural=(n != 1);`. Leaving the placeholder in causes an error once you switch languages.
</div>


## Compile and switch language

1. Compile the files:

    ```bash
    /opt/cloudbolt/manage.py compilemessages
    ```

1. 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"`.
1. 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.

## Related

- [Branded portals](/docs/cmp/configure/administration/system/branded-portals/): Changing the product name, logos, and colors that users see.
- [Using HTML in descriptions](/docs/cmp/configure/administration/system/using-html-in-descriptions/): Formatting the description text on your objects.
