File: lang-lua.texi

package info (click to toggle)
gettext 0.23.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 168,104 kB
  • sloc: ansic: 532,579; sh: 68,252; perl: 28,011; makefile: 9,066; lisp: 3,184; yacc: 1,055; java: 615; cs: 589; cpp: 397; objc: 343; sed: 79; tcl: 63; xml: 40; pascal: 11; php: 7; awk: 7
file content (74 lines) | stat: -rw-r--r-- 1,431 bytes parent folder | download | duplicates (2)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
@c This file is part of the GNU gettext manual.
@c Copyright (C) 1995-2024 Free Software Foundation, Inc.
@c See the file gettext.texi for copying conditions.

@node Lua
@subsection Lua

@table @asis
@item RPMs
lua

@item Ubuntu packages
lua, lua-gettext
@*
You need to install the @code{lua-gettext} package from
@url{https://gitlab.com/sukhichev/lua-gettext/blob/master/README.us.md}.
Debian and Ubuntu packages of it are available.  Download the
appropriate one, and install it through
@samp{sudo dpkg -i lua-gettext_0.0+nmu1_amd64.deb}.

@item File extension
@code{lua}

@item String syntax
@itemize @bullet

@item @code{"abc"}

@item @code{'abc'}

@item @code{[[abc]]}

@item @code{[=[abc]=]}

@item @code{[==[abc]==]}

@item ...

@end itemize

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

@item gettext/ngettext functions
@code{gettext.gettext}, @code{gettext.dgettext}, @code{gettext.dcgettext},
@code{gettext.ngettext}, @code{gettext.dngettext}, @code{gettext.dcngettext}

@item textdomain
@code{textdomain} function

@item bindtextdomain
@code{bindtextdomain} function

@item setlocale
automatic

@item Prerequisite
@code{require 'gettext'} or running lua interpreter with @code{-l gettext} option

@item Use or emulate GNU gettext
use

@item Extractor
@code{xgettext}

@item Formatting with positions
---

@item Portability
On platforms without gettext, the functions are not available.

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