Move translate documentation

This commit is contained in:
Nolway 2021-12-18 22:32:15 +01:00 committed by Alexis Faizeau
parent 41ef9fd49f
commit 31b92da6ce
2 changed files with 18 additions and 12 deletions

View File

@ -107,3 +107,7 @@ $ LIVE_RELOAD=0 docker-compose up -d
# Wait 2-3 minutes for the environment to start, then:
$ PROJECT_DIR=$(pwd) docker-compose -f docker-compose.testcafe.yml up
```
### A bad wording or a missing language
If you notice a translation error or missing language you can help us by following the [how to translate](docs/dev/how-to-translate.md) documentation.

View File

@ -2,9 +2,9 @@
## How the translation files work
In the translations folder, all json files of the form [namespace].[language code].json are interpreted to create languages by the language code in the file name.
In the `front/translations` folder, all json files of the form `[namespace].[language code].json` are interpreted to create languages by the language code in the file name.
The only mandatory file (the entry point) is the `index.[language code].json` which must contain the properties language, country and default so that the language can be taken into account.
The only mandatory file (the entry point) is the `index.[language code].json` which must contain the properties `language`, `country` and `default` so that the language can be taken into account.
Example:
```json
@ -32,6 +32,8 @@ Example:
- main-menu.fr-FR.json
- chat.fr-FR.json
If a key isn't found then it will be searched in the fallback language and if it isn't found then the key will be returned. By default the fallback language is `en-US` but you can set another one with the `FALLBACK_LANGUAGE` environment variable.
## Add a new language
It is very easy to add a new language!