GETPXLANGUAGE Function

Returns the current two-letter language code.
Category: Locale

Syntax

GETPXLANGUAGE()

Details

The GETPXLANGUAGE function returns the two-letter language code based on the current value of the LOCALE= SAS system option. The length of the language name is two characters. If the size of the variable that receives the value is less than two characters, the value is truncated.

Example

In the first example, the LOCALE= system option is set to French_France. The second example is set to German. The third example is set to English_United States.
Statements
Results
option locale=french_france;
lang=getpxLanguage();
put lang;
fr
option locale=German;
lang=getpxLanguage();
put lang;
de
option locale=en_US;
lang=getpxLanguage();
put lang;
en

See Also

System Options: