translation: add fallback option to langMeta

If set to a language code (e.g fr-fr), any missing strings will be
filled in from that language (if possible) rather than from the default
en-us. Currently not used, but could be useful in the future for
variations of the same language.
This commit is contained in:
Harvey Tindall
2021-04-13 18:34:13 +01:00
parent 55e21f8be3
commit 3273607fc3
3 changed files with 284 additions and 108 deletions

View File

@@ -2,6 +2,8 @@ package main
type langMeta struct {
Name string `json:"name"`
// Language to fall back on if strings are missing. Defaults to en-us.
Fallback string `json:"fallback,omitempty"`
}
type quantityString struct {