This thread is a guide of how to set up an Indico instance with a new language. It is useful for translators when applying their revisions to verify how the translation looks in production.
1. Create your own Indico instance.
This could be in our own computer, in a shared machine or even your organisation, if the latter gives you permission.
To create our own Indico instance, we provide two different guides. The first one is for a production system, it will prepare Indico to be served to users and used in all the different purposes you may have besides translations. The second is development, a light-weight, easier to set up, version oriented to testing purposes, that should not be exposed to the public.
For this guide, we recommend and only provide the steps when using the development version.
2. Installing the transifex client
3. Get an API token
Go to here and generate your API token. Afterwards, you should run the command tx init --skipsetup
. It will request the token you just copied from the previous settings and save it locally so you can start using transifex locally.
If you do not know how to run this command, please refer to the guide here.
4. Install the translations
Navigate to the src
folder inside Indico path.
Run tx pull -f -l <language_code
. Languages codes can be obtained here. For example, Chinese (China) is zh_CN.GB2312
.
5. Compile and Run Indico
Run the command indico i18n compile-catalog
and indico i18n compile-catalog-react
and launch Indico. The language should now show up as an option in the top right corner.
FAQ
Why isn’t Indico loading my language?
Some languages in transifex use codes that Indico is not able to recognize.
One example is the Chinese’s zh_CN.GB2312
.
The easy fix to this is to rename the folder in indico/translations/zh_CN.GB2312
to zh_Hant_TW
. Unfortunately, there isn’t any list with mappings for all the languages. So if by any reason it doesn’t work for you, feel free to ask below!