1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-05 05:15:24 +02:00
tldr/pages/common/gettext.md
Kristopher 3df1bd1ebf
gettext: refresh page (#16555)
Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
2025-05-26 17:04:19 +03:00

18 lines
649 B
Markdown

# gettext
> 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 as specified in the domain file (falls back to given `msgid` if no translation exists):
`LANGUAGE={{locale}} gettext {{[-d|--domain]}} {{domain}} "{{msgid}}"`
- Display help:
`gettext {{[-h|--help]}}`
- Display gettext version:
`gettext {{[-V|--version]}}`