Previous Topic Next topic Print topic


Using the LANG Environment Variable

Restriction: National Locale Support is not available for .NET managed code.

You define a locale using the LANG environment variable. LANG is set using the operating system command SET:

set LANG=language

Parameters (Windows)

where the parameters are:

language The language environment in which you wish to run your program. This determines which message catalog is open so that if an error occurs, the error message is output in the selected language. language can take any of the following values:
  • 1 = American English
  • 2 = Canadian French
  • 3 = Danish
  • 4 = Dutch
  • 5 = English
  • 6 = Finnish
  • 7 = French
  • 8 = German
  • 9 = Italian
  • 10 = Norwegian
  • 11 = Portuguese
  • 12 = Spanish
  • 13 = Swedish
_ The delimiter for language and territory, if territory is specified.

The following example illustrates how to specify a language of French and use the operating system values for the territory and codepage:

set LANG=7

Parameter (UNIX)

language The language environment in which you wish to run your program. This determines which message catalog is open so that if an error occurs, the error message is output in the selected language. language can take the following values:
  • en_US = American English
  • en_GB = English
  • jp_JP = Japanese (EUC encoding)
  • jp_JP.sjis = Japanese (Shift-JIS encoding)
  • jp_JP.utf8 = Japanese (UTF8 encoding)

The following example illustrates how to specify a language of English and use the operating system values for the territory and codepage:

set LANG=en_GB
export LANG
Previous Topic Next topic Print topic