1Locale::gettext_xs(3) User Contributed Perl DocumentationLocale::gettext_xs(3)
2
3
4
6 Locale::gettext_xs - XS Implementation of Uniforum Message Translation
7
9 use gettext_xs qw(:locale_h :libintl_h);
10
11 gettext $msgid;
12 dgettext $domainname, $msgid;
13 dcgettext $domainname, $msgid, LC_MESSAGES;
14 ngettext $msgid, $msgid_plural, $count;
15 dngettext $domainname, $msgid, $msgid_plural, $count;
16 dcngettext $domainname, $msgid, $msgid_plural, $count, LC_MESSAGES;
17 pgettext $msgctxt, $msgid;
18 dpgettext $domainname, $msgctxt, $msgid;
19 dcpgettext $domainname, $msgctxt, $msgid, LC_MESSAGES;
20 npgettext $msgctxt, $msgid, $msgid_plural, $count;
21 dnpgettext $domainname, $msgctxt, $msgid, $msgid_plural, $count;
22 dcnpgettext $domainname, $msgctxt, $msgid, $msgid_plural, $count, LC_MESSAGES;
23 textdomain $domainname;
24 bindtextdomain $domainname, $directory;
25 bind_textdomain_codeset $domainname, $encoding;
26 my $category = LC_CTYPE;
27 my $category = LC_NUMERIC;
28 my $category = LC_TIME;
29 my $category = LC_COLLATE;
30 my $category = LC_MONETARY;
31 my $category = LC_MESSAGES;
32 my $category = LC_ALL;
33
35 The module Locale::gettext_xs is the low-level interface to message
36 translation according to the Uniforum approach that is for example used
37 in GNU gettext and Sun's Solaris.
38
39 The module does not necessarily work on your system. It depends on the
40 presence of shared libraries that are not always available. The
41 higher-level modules Locale::TextDomain::[22m(3), resp.
42 Locale::Messages(3) will fall back to a pure Perl version if
43 boostrapping Locale::gettext_xs fails.
44
45 The interface of Locale::gettext_xs is mostly identical to the pure
46 Perl version as described in Locale::gettext_pp(3), see there for
47 details. Differences are outlined below.
48
49 Locale::gettext_xs is downwards compatible to Locale::gettext(3) by
50 Phillip Vandry <vandry@Mlink.NET>. You can use it as replacement for
51 Locale::gettext(3).
52
53 Please note that directory names passed to the function
54 bindtextdomain() are automatically converted from Perl semantics (slash
55 as directory separator) to local semantics (for example the backslash
56 for MS-DOS).
57
59 Copyright (C) 2002-2017 Guido Flohr <http://www.guido-flohr.net/>
60 (<mailto:guido.flohr@cantanea.com>), all rights reserved. See the
61 source code for details!code for details!
62
63 The module is based on the work of Phillip Vandry <vandry@Mlink.NET> in
64 Locale::gettext(3).
65
67 Locale::TextDomain(3pm), Locale::gettext_pp(3pm), Locale::gettext(3pm),
68 Locale::Messages(3pm), File::Spec(3), perl(1)
69
71 Hey! The above document had some coding errors, which are explained
72 below:
73
74 Around line 105:
75 =cut found outside a pod block. Skipping to next block.
76
77
78
79perl v5.30.1 2020-01-30 Locale::gettext_xs(3)