perl-gettext

Message Handling Functions

The gettext module permits access from perl to the gettext() family of functions for retrieving message strings from databases constructed to internationalize software. * $d = Locale::gettext->domain(DOMAIN) * $d = Locale::gettext->domain_raw(DOMAIN) Creates a new object for retrieving strings in the domain *DOMAIN* and returns it. 'domain' requests that strings be returned as Perl strings (possibly with wide characters) if possible while 'domain_raw' requests that octet strings directly from functions like 'dgettext()'. * $d->get(MSGID) Calls 'dgettext()' to return the translated string for the given *MSGID*. * $d->cget(MSGID, CATEGORY) Calls 'dcgettext()' to return the translated string for the given *MSGID* in the given *CATEGORY*. * $d->nget(MSGID, MSGID_PLURAL, N) Calls 'dngettext()' to return the translated string for the given *MSGID* or *MSGID_PLURAL* depending on *N*. * $d->ncget(MSGID, MSGID_PLURAL, N, CATEGORY) Calls 'dngettext()' to return the translated string for the given *MSGID* or *MSGID_PLURAL* depending on *N* in the given *CATEGORY*. * $d->dir([NEWDIR]) If *NEWDIR* is given, calls 'bindtextdomain' to set the name of the directory where messages for the domain represented by '$d' are found. Returns the (possibly changed) current directory name. * $d->codeset([NEWCODE]) For instances created with 'Locale::gettext->domain_raw', manuiplates the character set of the returned strings. If *NEWCODE* is given, calls 'bind_textdomain_codeset' to set the character encoding in which messages for the domain represented by '$d' are returned. Returns the (possibly changed) current encoding name. gettext(), dgettext(), and dcgettext() attempt to retrieve a string matching their 'msgid' parameter within the context of the current locale. dcgettext() takes the message's category and the text domain as parameters while dgettext() defaults to the LC_MESSAGES category and gettext() defaults to LC_MESSAGES and uses the current text domain. If the string is not found in the database, then 'msgid' is returned. ngettext(), dngettext(), and dcngettext() function similarily but implement differentiation of messages between singular and plural. See the documentation for the corresponding C functions for details. textdomain() sets the current text domain and returns the previously active domain. _bindtextdomain(domain, dirname)_ instructs the retrieval functions to look for the databases belonging to domain 'domain' in the directory 'dirname' _bind_textdomain_codeset(domain, codeset)_ instructs the retrieval functions to translate the returned messages to the character encoding given by *codeset* if the encoding of the message catalog is known.

There is no official package available for openSUSE Leap 15.4

Distributions

openSUSE Tumbleweed

openSUSE Leap 15.4

openSUSE Leap 15.3

openSUSE Leap 15.2

SUSE SLE-15-SP2

SUSE SLE-15-SP1

SUSE SLE-12-SP5

RedHat RHEL-7

RedHat RHEL-6

RedHat RHEL-5

Mageia Cauldron (unstable)

Unsupported distributions

The following distributions are not officially supported. Use these packages at your own risk.

openSUSE:Leap:15.0

openSUSE:Leap:15.1

openSUSE:11.1

openSUSE:11.4

openSUSE:12.1

openSUSE:12.2

openSUSE:12.3

openSUSE:13.1

openSUSE:13.2

openSUSE:Leap:42.1

openSUSE:Leap:42.2

openSUSE:Leap:42.3

devel:LEO

SUSE:SLE-12:SLE-Module-Adv-Systems-Management

SUSE:SLE-15:GA

Intel:Moblin2

Base:build

DISCONTINUED:openSUSE:11.1

Mageia:6

CentOS:CentOS-6

home:coolo:carwos

home:coolo:carwos:bootstrap:v1

SUSE:SLE-12:SLE-Module-Toolchain