mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2025-12-19 19:20:02 +01:00
translations: mention fallbacks
This commit is contained in:
parent
52d7a706f0
commit
454f24404e
1 changed files with 13 additions and 1 deletions
|
|
@ -46,4 +46,16 @@ 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.
|
||||
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.
|
||||
Loading…
Add table
Reference in a new issue