NAME

NLSPATH

DESCRIPTION

This variable contains a sequence of templates that the catopen() function uses when attempting to locate message catalogues. Each template consists of an optional prefix, one or more substitution fields, a filename and an optional suffix.

For example:

NLSPATH="/usr/share/nls/%N.cat"

defines that catopen() should look for all message catalogues in the directory /usr/share/nls, where the catalogue name should be constructed from the name parameter passed to catopen() (%N), with the suffix .cat.

Substitution fields consist of a "%" symbol, followed by a single-letter keyword. The following keywords are currently defined:

%N
The value of the name parameter passed to catopen().
%L
The value of the LC_MESSAGES category.
%l
The language element from the LC_MESSAGES category.
%t
The territory element from the LC_MESSAGES category.
%c
The codeset element from the LC_MESSAGES category.
%%
A single % character.

An empty string is substituted if the specified value is not currently defined. The separators underscore (_) and period (.) are not included in %t and %c substitutions.

Templates defined in NLSPATH are separated by colons (:). A leading or two adjacent colons :: is equivalent to specifying %N. For example:

NLSPATH=":%N.cat:/usr/share/locale/%L/%N.cat"

indicates to catopen() that it should look for the requested message catalogue in name, name.cat and /usr/share/locale/category/name.cat, where category is the value of the LC_MESSAGES category of the current locale.

Users should not set the NLSPATH variable unless they have a specific reason to override the default system path. Doing so causes undefined behaviour in the standard utilities.