Skip to main content

*GETLOCALE Locale Settings

Description

The *getlocale subroutine is used to quickly access the operating system's locale settings and return a particular parameter if it is available. A locale is a set of parameters that defines the user's language and country, as well as any special variant preferences that the user wants to see in the interface. A locale identifier typically consists of at least a language identifier and a region identifier.

For a list of locale parameters in Windows and in Linux, see Locale Parameters in Windows and Locale Parameters in Linux.

Example:

CALL "*getlocale","ABBREVMONTHNAMES",ans$

This will return the abbreviated month names in the language set in the operating system:

LanguageAbbreviated Month Names
English (Canadian)Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
German (Germany)Jan,Feb,Mrz,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Dez
Spanish (Columbia)ene,feb,mar,abr,may,jun,jul,ago,sep,oct,nov,dic

Locale Parameters in Windows

This table displays a list of available locale parameters in Windows:

ParameterDescription
ABBREVDAYNAMESAbbreviated day names
ABBREVMONTHNAMESAbbreviated month names
AMPMPeriod designators (e.g. "AM,PM")
COUNTRYNAMELocalized name of country (e.g. "Germany" in UI language)
CURRENCYLocal monetary symbol (e.g. "$")
DAYNAMESLong day names
DECIMALDecimal separator (e.g. "." for 1,234.00)
DIGITSNumber of fractional digits (e.g. 2 for 1.00)
ENGCOUNTRYNAMEEnglish name of country (e.g. "Germany")
ENGLISHLANGUAGENAMEEnglish name of language (e.g. "German")
INTLSYMBOLInternational monetary symbol (e.g. "USD")
ISO3166CTRYNAMEISO abbreviated country name (e.g. "US")
ISO639LANGNAMEISO abbreviated language name (e.g. "en")
LOCALIZEDDISPLAYNAMELocalized name of locale (e.g. "German (Germany)" in UI language)
LOCALIZEDLANGUAGENAMELanguage Display Name for a language (e.g. "German" in UI language)
LONGDATELong date format string (e.g. "dddd, MMMM dd, yyyy")
LZEROLeading zeros for decimal (e.g. 0 for .97, 1 for 0.97)
MEASURE0 = Metric, 1 = US Imperial
MONDECIMALSEPMonetary decimal separator (e.g. "." for $1,234.00)
MONTHNAMESLong month names
MONTHOUSANDSEPMonetary thousand separator (e.g. "," for $1,234.00)
NATIVECOUNTRYNAMENative name of country (e.g. "Deutschland")
NATIVELANGUAGENAMENative name of language (e.g. "Deutsch")
SHORTDATEShort date format string (e.g. "MM/dd/yyyy")
THOUSANDThousand separator (e.g. "," for 1,234.00)
TIMEFORMATTime format string (e.g. "HH:mm:ss")

Locale Parameters in Linux

This table displays a list of available locale parameters in Linux:

ParameterDescription
ABBREVDAYNAMESAbbreviated day names
ABBREVMONTHNAMESAbbreviated month names
AMPMPeriod designators (e.g. "AM,PM")
CURRENCYLocal monetary symbol (e.g. "$")
DAYNAMESLong day names
DECIMALDecimal separator (e.g. "." for 1,234.00)
DIGITSNumber of fractional digits (e.g. 2 for 1.00)
ENGCOUNTRYNAMEEnglish name of country (e.g. "Germany")
ENGLISHLANGUAGENAMEEnglish name of language (e.g. "German")
INTLSYMBOLIntl monetary symbol (e.g. "USD")
ISO3166CTRYNAMEISO abbreviated country name (e.g. "US")
ISO639LANGNAMEISO abbreviated language name (e.g. "en")
LONGDATELong date format string (e.g. "dddd, MMMM dd, yyyy")
MEASURE1 = Metric, 2 = US Imperial
MONDECIMALSEPMonetary decimal separator (e.g. "." for $1,234.00)
MONTHNAMESLong month names
MONTHOUSANDSEPMonetary thousand separator (e.g. "," for $1,234.00)
NATIVECOUNTRYNAMENative name of country (e.g. "Deutschland")
NATIVELANGUAGENAMENative name of language (e.g. "Deutsch")
SHORTDATEShort date format string (e.g. "MM/dd/yyyy")
THOUSANDThousand separator (e.g. "," for 1,234.00)
TIMEFORMATTime format string (e.g. "HH:mm:ss")