Extracted from Pike v7.3 release 18 at 2002-03-27.
pike.roxen.com
[Top]
Gettext

Method Gettext.setlocale()


Method setlocale

int Gettext.setlocale(int category, object stringlocale)

Description

The setlocale() function is used to set the program's current locale. If locale is "C" or "POSIX", the current locale is set to the portable locale.

If locale is "", the locale is set to the default locale which is selected from the environment variable LANG.

The argument category determines which functions are influenced by the new locale:

Locale.Gettext.LC_ALL for all of the locale.

Locale.Gettext.LC_COLLATE for the functions strcoll() and strxfrm() (used by pike, but not directly accessible).

Locale.Gettext.LC_CTYPE for the character classification and conversion routines.

Locale.Gettext.LC_MONETARY for localeconv().

Locale.Gettext.LC_NUMERIC for the decimal character.

Locale.Gettext.LC_TIME for strftime() (currently not accessible from Pike).

Parameter category

The category in which to set the locale.

Parameter locale

The locale to change to

Returns

1 if the locale setting successed, 0 for failure

See also

Gettext.bindtextdomain, Gettext.textdomain, Gettext.gettext, Gettext.dgettext, Gettext.dcgettext, Gettext.localeconv