Including a new language in Indico

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!

1 Like

Thank you for your contribution!
It is such a recurring task, that the description should even make it into the official Indico docs in my opinion (together with the production installation, which was only given in some workshop slides up to now, unless I missed it).

IMO this is not a task Indico administrators likely do. Usually they get a new translation by updating Indico to a version where it’s bundled.

You mean that docs.getindico.io are only for administrators? I know we had mentioned that in the past: Where do developer docs/instructions go? Maybe it was the github wiki? I do not remember? Is there a clear opinion on the answer today?

Hm, maybe a new “Translation” section in the docs would indeed be a good idea. I was confused by the “together with the production installation” part in your previous post.

1 Like

Thanks, @dirk. I agree, sounds like a good idea for the “Translation” section like @ThiefMaster mentioned.

1 Like