Environment variables for localization

TRS examines environment variables when determining which language, character set, sort order, and datetime formats to use for an application.

TRS uses standard POSIX localization environment variables.

Some systems automatically set environment variables when a user logs in. If your system does this, either reset the variables after logging in or make sure that their automatic values correspond to an entry in the Sybase locales file.

Table C-2 lists the environment variables that are related to TRS localization:

Table C-2: TRS localization environment variables

Environment variable

Definition

When

LC_ALL

Indicates which language and character set to use for messages, datatype conversions, and datetime formats.

  • The application calls cs_ctx_alloc.

  • The application calls cs_locale with type as CS_LC_ALL and buffer as NULL.

LC_CTYPE

Indicates which character set to use for datatype conversions.

The application calls cs_locale with type as CS_LC_CTYPE and buffer as NULL.

LC_COLLATE

Indicates which collating sequence (sort order) to use when sorting and comparing character data.

The application calls cs_locale with type as CS_LC_COLLATE and buffer as NULL.

LC_MESSAGE

Indicates which language and character set to use for messages.

The application calls cs_locale with type as CS_LC_MESSAGE and buffer as NULL.

LC_TIME

Indicates which language to use when converting between datetime and character datatypes. LC_TIME controls the following:

  • Month names and abbreviations

  • Datepart ordering

  • Whether the “am/pm” string is used

The application calls cs_locale with type as CS_LC_TIME and buffer as NULL.

When an application calls cs_locale, Client–Library examines LANG if the cs_locale buffer is NULL and the LC_ALL variable corresponding to type is not defined.

LANG

Indicates which language, character set, and sort order to use for messages, datatype conversions, and datetime formats.

NoteOpen Client and Open Server products search for LANG if they cannot find LC_ALL.

The application calls ct_ctx_alloc, Client-Library examines LANG if LC_ALL is not defined.

When an application calls cs_locale, Client–Library examines LANG if the cs_locale buffer is NULL and the LC_ALL variable corresponding to type is not defined.