I18N Summary (The GNU Awk User’s Guide)
From Get docs
Gawk/docs/latest/I18N-Summary
Previous: Gawk I18N, Up: Internationalization [Contents][Index]
13.7 Summary
- Internationalization means writing a program such that it can use multiple languages without requiring source code changes. Localization means providing the data necessary for an internationalized program to work in a particular language.
gawkuses GNUgettextto let you internationalize and localizeawkprograms. A program’s text domain identifies the program for grouping all messages and other data together.- You mark a program’s strings for translation by preceding them with an underscore. Once that is done, the strings are extracted into a
.potfile. This file is copied for each language into a.pofile, and the.pofiles are compiled into.gmofiles for use at runtime. - You can use positional specifications with
sprintf()andprintfto rearrange the placement of argument values in formatted strings and output. This is useful for the translation of format control strings. - The internationalization features have been designed so that they can be easily worked around in a standard
awk. gawkitself has been internationalized and ships with a number of translations for its messages.