# Method Locale.Gettext.setlocale()

Method setlocale

  ``int` setlocale(`int` `category`, `string` `locale`)`

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 are LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC and LC_TIME.

Returns

  Returns 1 if the locale setting successed, 0 for failure

See also

  bindtextdomain, textdomain, gettext, dgettext, dcgettext, localeconv