summaryrefslogtreecommitdiff
path: root/gettext-tools/doc/lang-gawk.texi
blob: a5bc91781e2ff2c7bd7abb397a4929f18b7ce8b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@c This file is part of the GNU gettext manual.
@c Copyright (C) 1995-2020 Free Software Foundation, Inc.
@c See the file gettext.texi for copying conditions.

@node gawk
@subsection GNU awk
@cindex awk
@cindex gawk

@table @asis
@item RPMs
gawk 3.1 or newer

@item Ubuntu packages
gawk

@item File extension
@code{awk}, @code{gawk}, @code{twjr}.
The file extension @code{twjr} is used by TexiWeb Jr
(@uref{https://github.com/arnoldrobbins/texiwebjr}).

@item String syntax
@code{"abc"}

@item gettext shorthand
@code{_"abc"}

@item gettext/ngettext functions
@code{dcgettext}, missing @code{dcngettext} in gawk-3.1.0

@item textdomain
@code{TEXTDOMAIN} variable

@item bindtextdomain
@code{bindtextdomain} function

@item setlocale
automatic, but missing @code{setlocale (LC_MESSAGES, "")} in gawk-3.1.0

@item Prerequisite
---

@item Use or emulate GNU gettext
use

@item Extractor
@code{xgettext}

@item Formatting with positions
@code{printf "%2$d %1$d"} (GNU awk only)

@item Portability
On platforms without gettext, no translation.  On non-GNU awks, you must
define @code{dcgettext}, @code{dcngettext} and @code{bindtextdomain}
yourself.

@item po-mode marking
---
@end table

An example is available in the @file{examples} directory: @code{hello-gawk}.