Previous Page | Next Page

Locale for NLS

Specifying a Locale


How Locale Is Specified at SAS Invocation

You can use the LOCALE= system option to specify the locale of the SAS session at SAS invocation. LOCALE= also implicitly sets the following SAS system options:

Windows example:

sas9 -locale English_UnitedStates

Note:   Locale can also be specified using POSIX naming standards. For example, en_US is the POSIX equivalent for the SAS value English_UnitedStates.  [cautionend]

Default values for the LOCALE= option are the same under each operating environment. For details, see Values for the LOCALE= System Option.

The English_UnitedStates value for LOCALE= causes the following options to be implicitly set to the specified default values SAS invocation:

At invocation, an explicitly set system option will override any implicitly set option.

Windows example:

sas9 - papersize=A4;

At invocation, the explicit setting PAPERSIZE=A4 will override an implicit setting of the PAPERSIZE= option via the LOCALE= option. For details, see DATESTYLE= System Option.


How Locale Is Specified During a SAS Session

You can use the LOCALE= system option to specify the locale of the SAS session during the SAS session. However, only the values for these system options will change implicitly to reflect the changed value of LOCALE=:

The values for these system options will not change implicitly to reflect the changed value of LOCALE=:

Note:   ENCODING= cannot be reset during a SAS session. It can be set only at invocation.  [cautionend]

Note:   For more details about the differences between the LOCALE= and ENCODING= options, see Setting the Encoding of a SAS Session  [cautionend]

Windows example:

options locale=Italian_Ialy;

The Italian_Italy value that is assigned to the LOCALE= option causes the following options to be implicitly reset during the SAS session to reflect the changed value of the LOCALE= system option:

The values for the ENCODING= and TRANTAB= options will not be reset; their former values will be retained.

For details about these system options, see DATESTYLE= System Option.


Language Switching

SAS messages are displayed in the language that is specified by the settings in the SAS configuration file during startup. In the Unicode server, you can view SAS messages in another language by using the Language Switching feature. You can access the Language Switching feature with the LOCALELANGCHG system option. If LOCALELANGCHG is enabled, then the value of the LOCALE system option determines the language for procedure output, user interface elements and ODS fonts. If LOCALELANGCHG is disabled, then messages will appear in the language that is set during startup. This feature is supported in the Unicode server. For more information, see the LOCALELANGCHG System Option

Previous Page | Next Page | Top of Page