I18N Summary (The GNU Awk User’s Guide)

From Get docs
Gawk/docs/latest/I18N-Summary


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.
  • gawk uses GNU gettext to let you internationalize and localize awk programs. 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 .pot file. This file is copied for each language into a .po file, and the .po files are compiled into .gmo files for use at runtime.
  • You can use positional specifications with sprintf() and printf to 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.
  • gawk itself has been internationalized and ships with a number of translations for its messages.