# abqpy docs locales

This is the locales directory for the abqpy documentation. More information about Sphinx Internationalization can be found [here](https://www.sphinx-doc.org/en/master/usage/advanced/intl.html).

## How to add a new language

Update the `update.sh` script to include new languages, for example:

```sh
sphinx-intl update -p locales/pot -l zh_CN -l es
```
Supported languages by Sphinx are listed [here](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language).
After that, submit a pull request with the new script (only), do not include the generated `po` files since those files need to be backported to other branches, and it might differ from branch to branch, new language files will be generated by the CI, and then you can translate the new files. 

## How to translate the docs

Open the `.po` files for the language you want to translate and use a tool like [Poedit](https://poedit.net/) to translate the strings. Create a pull request with the translated `.po` file.

## How to build the docs with specific language

Specify the language in the `sphinx-build` command, for example:

```sh
sphinx-build -b html -D language=zh_CN docs/source docs/build/html/zh_CN
```
