GNU gettext utilities: gawk
From Get docs
Gettext/docs/latest/gawk
Next: Lua, Previous: bash, Up: List of Programming Languages [Contents][Index]
15.5.14 GNU awk
- RPMs
- gawk 3.1 or newer
- Ubuntu packages
- gawk
- File extension
awk,gawk,twjr. The file extensiontwjris used by TexiWeb Jr (https://github.com/arnoldrobbins/texiwebjr).- String syntax
"abc"- gettext shorthand
_"abc"- gettext/ngettext functions
dcgettext, missingdcngettextin gawk-3.1.0- textdomain
TEXTDOMAINvariable- bindtextdomain
bindtextdomainfunction- setlocale
- automatic, but missing
setlocale (LC_MESSAGES, "")in gawk-3.1.0 - Prerequisite
- —
- Use or emulate GNU gettext
- use
- Extractor
xgettext- Formatting with positions
printf "%2$d %1$d"(GNU awk only)- Portability
- On platforms without gettext, no translation. On non-GNU awks, you must define
dcgettext,dcngettextandbindtextdomainyourself. - po-mode marking
- —
An example is available in the examples directory: hello-gawk.