Set or return the current locale

setlocale()

Set or return the current locale


SYNTAX

setlocale(category, locale)

Sets the required locale or returns the current locale.

category

Categories are defined in sculptor.h with the prefix LC_.

LC_ALL
LC_COLLATE
LC_CTYPE
LC_MONETARY
LC_NUMERIC
LC_TIME

locale

If this argument is NULL or “”, the function returns the full name of the current locale.

Otherwise the argument should specify the required locale. This can be a full locale string that specifies the language, country and code page required, e.g. “French_France.1252” or just the language, e.g. “French”, in which case the default full string for the specified language is used. The function returns the full name of the new locale.

The example program $SCULPTOR\examples\setlocale.r demonstrates this function. See the MSDN Library documentation on the SetLocale function for further information.


EXAMPLE

!temp OriginalLocale,"Original Locale",a50

     +textbox tbOriginalLocale at 121,48 {
          field = tmp.OriginalLocale
          style = WS_NOTABSTOP
     }

     tmp.OriginalLocale = setlocale(LC_ALL, "")
     display tbOriginalLocale