Locale::gettext_xs(3)
π NAME π
Okay so welcome to the Locale::gettext_xs(3) manual page, bestie! This is all about Locale::gettext_xs β XS Implementation of Uniforum Message Translation. No cap, that's the name and the vibe. π
β¨ SYNOPSIS β¨
Here's the exact spellbook, so keep every line character-for-character:
use gettext_xs qw(:locale_h :libintl_h);
gettext $msgid;
dgettext $domainname, $msgid;
dcgettext $domainname, $msgid, LC_MESSAGES;
ngettext $msgid, $msgid_plural, $count;
dngettext $domainname, $msgid, $msgid_plural, $count;
dcngettext $domainname, $msgid, $msgid_plural, $count, LC_MESSAGES;
pgettext $msgctxt, $msgid;
dpgettext $domainname, $msgctxt, $msgid;
dcpgettext $domainname, $msgctxt, $msgid, LC_MESSAGES;
npgettext $msgctxt, $msgid, $msgid_plural, $count;
dnpgettext $domainname, $msgctxt, $msgid, $msgid_plural, $count;
dcnpgettext $domainname, $msgctxt, $msgid, $msgid_plural, $count, LC_MESSAGES;
textdomain $domainname;
bindtextdomain $domainname, $directory;
bind_textdomain_codeset $domainname, $encoding;
my $category = LC_CTYPE;
my $category = LC_NUMERIC;
my $category = LC_TIME;
my $category = LC_COLLATE;
my $category = LC_MONETARY;
my $category = LC_MESSAGES;
my $category = LC_ALL;
Periodt. Copy-paste energy, but keep it exact. π«Ά
π¦ DESCRIPTION π¦
The module Locale::gettext_xs is the low-level interface to message translation according to the Uniforum approach β the same approach that's for example used in GNU gettext and Sun's Solaris. It's giving low-level translation realness, and honestly? Obsessed.
π¨ Real talk, bestie: this module does not necessarily work on your system. It depends on the presence of shared libraries that are not always available. The higher-level modulesLocale::TextDomain::(3), resp.Locale::Messages(3)will fall back to a pure Perl version if boostrappingLocale::gettext_xsfails. So like, the fallback is the safety net. π§
The interface of Locale::gettext_xs is mostly identical to the pure Perl version as described in Locale::gettext_pp(3); see there for details. Differences are outlined below. π
Locale::gettext_xs is downwards compatible to Locale::gettext(3) by Phillip Vandry <vandry@Mlink.NET>. You can use it as a replacement for Locale::gettext(3). Slay, compatibility.
Please note that directory names passed to the function bindtextdomain() are automatically converted from Perl semantics (slash as directory separator) to local semantics (for example the backslash for MS-DOS). That detail is lowkey important, fr fr. π¦
π AUTHOR π
Copyright (C) 2002-2017 Guido Flohr <http://www.guido-flohr.net/> (<mailto:guido.flohr@cantanea.com>), all rights reserved. See the source code for details!code for details! Yes, that's literally the source line β weird little typo and all π.
The module is based on the work of Phillip Vandry <vandry@Mlink.NET> in Locale::gettext(3). Iconic lineage, honestly. β¨
π SEE ALSO π
Locale::TextDomain(3pm)Locale::gettext_pp(3pm)Locale::gettext(3pm)Locale::Messages(3pm)File::Spec(3)perl(1)
π Mwah β this page came from perl v5.42.0 and is dated 2025-01-22. Byeee, bestie! π
π¦ where this page comes from
- opensuse-leap 16.0: perl-libintl-perl 1.350.0-160000.2.2 Β· GPL-3.0-or-later
- opensuse-leap 16.0: perl-libintl-perl 1.350.0-160000.2.2 Β· GPL-3.0-or-later
- opensuse-leap 16.0: perl-libintl-perl 1.350.0-160000.2.2 Β· GPL-3.0-or-later
- opensuse-leap 16.0: perl-libintl-perl 1.350.0-160000.2.2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms