translations: mention fallbacks

This commit is contained in:
Vaxry 2025-11-15 21:26:52 +00:00
parent 52d7a706f0
commit 454f24404e
Signed by: vaxry
GPG key ID: 665806380871D640

View file

@ -47,3 +47,15 @@ registerEntry("pl_PL", TXT_KEY_HELLO, [](const Hyprutils::I18n::translationVarMa
As you can see, you can change the returned string based on some variable. Please note all variables
are strings, so you need to call a standard function like `std::stoi` to obtain an integer.
### Fallbacks
In general, if you are translating into a language with regional variants, if the translations are the same,
you don't need two entries.
Order of fallbacks is as follows:
`xy_ZT` -> `xy_XY` -> `xy_ANYTHING` -> `global fallback`, usually `en_US`.
So, if you write something for `de_DE`, and the user has `de_AT`, if `de_AT` is missing,
`de_DE` will be used.