Use xx-XX format for translation files and default to en-US

Many languages have different variants, so instead of "en" we should be
using "en-US" - this will make it possible to add slightly different
British English translations, for example.
Note that this was already supported for the `locale` config option, we
were simply discarding the part after the dash when looking for the
right translation file.

Also make sure the en-US translations are actually American English,
I'll add en-GB separately.
This commit is contained in:
Linus Groh
2021-02-14 13:21:54 +01:00
parent a9026c7a0a
commit b29cd12ed9
8 changed files with 12 additions and 11 deletions
+7 -6
View File
@@ -171,15 +171,16 @@ formats.
Available languages:
- `de` (German)
- `en` (English)
- `es` (Spanish)
- `fr` (French)
- `de-DE` (Standard German)
- `en-US` (American English)
- `es-ES` (Castilian Spanish)
- `fr-FR` (Standard French)
You can use formats like `en-GB`, `en-US`, `de-DE`, `fr-FR`.
Using a locale with non-existent translations is possible and will affect date/time formats, but
use `en-US` for translations.
- Type: [`String`]
- Default: `"en"`
- Default: `"en-US"`
### `map.attribution`