LOCALE Subcommand (SET command)
The LOCALE
subcommand allows you to change the
locale used for data analysis. By default, the locale is set to the
computer’s system locale if possible. With the LOCALE
subcommand,
you can override the default behavior and process data files in other
locales without changing your computer’s system or user locale.
- The default locale is the current operating system locale.
- The
LOCALE
subcommand persists. The next time that IBM® SPSS® Statistics is started on your computer, IBM SPSS Statistics will run in that locale. - The
OSLOCALE
keyword sets the locale to the operating system locale. The application gets this information from the operating system each time you start the application. This is the default. - If the locale ID does not match the system locale, not all output will be rendered correctly.
- In code page mode, locale changes that also change the encoding can only be made when there are no open datasets. For information on code page mode and Unicode mode, see UNICODE Subcommand.
- You can use
SHOW LOCALE
to view the current IBM SPSS Statistics locale.
Example
SET LOCALE='Japanese'.
- When you are connecting to a server, the relevant locale ID is defined in the loclmap.xml file, which is located on the server computer. Check with your server administrator for available locale IDs.
- Locale ID values of the general form Language_Country.codepage#, which were valid in previous releases, are not valid in release 16.0 or later. In most instances, the "Language" portion of the old locale specification should be a valid locale ID in release 16.0 or later. For example, instead of 'Japanese_Japan.932', you could specify simply 'Japanese'. For a complete list of names and aliases that can be used to specify locale, go to http://www.iana.org/assignments/character-sets
Two-letter language abbreviations adhere to the ISO 639-1 standard: http://www.loc.gov/standards/iso639-2/php/code_list.php
Two-letter country codes adhere to the ISO 3166 standard: http://en.wikipedia.org/wiki/ISO_3166-1
Example
SET LOCALE='ja_JP.Shift_JIS'
- "ja" is the two-letter language code for Japanese.
- "JP" is the two-letter country code for Japan.
- "Shift_JIS" is the name of the character set.