mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-23 03:15:28 +02:00
gettext: refresh page (#16555)
Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
This commit is contained in:
parent
bb5068fe1b
commit
3df1bd1ebf
1 changed files with 9 additions and 3 deletions
|
@ -1,12 +1,18 @@
|
|||
# gettext
|
||||
|
||||
> Get string translations.
|
||||
> Translates a string using stored translations in a compiled `.mo` file.
|
||||
> Translations are stored in `/usr/share/locale/<locale_name>/LC_MESSAGES/` with `domain` being the filename without its extension.
|
||||
> See also: `msgfmt`, `msgunfmt`.
|
||||
> More information: <https://www.gnu.org/software/gettext/manual/html_node/gettext-Invocation.html>.
|
||||
|
||||
- Get the translation of a string or output a default string if it doesn't exist:
|
||||
- Get the translation of a string as specified in the domain file (falls back to given `msgid` if no translation exists):
|
||||
|
||||
`LANGUAGE={{locale}} gettext {{msgid}} {{default_value}}`
|
||||
`LANGUAGE={{locale}} gettext {{[-d|--domain]}} {{domain}} "{{msgid}}"`
|
||||
|
||||
- Display help:
|
||||
|
||||
`gettext {{[-h|--help]}}`
|
||||
|
||||
- Display gettext version:
|
||||
|
||||
`gettext {{[-V|--version]}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue