Choose a GLS Locale

The locale is a set of Informix® files that bring together information about data that is specific to a particular culture, language, or territory.

In particular, a GLS locale provides the following information:
  • The name of the code set that the application data uses
  • The classes of characters in the code set
  • The collation order to use for character data
  • The format for date, time, numeric, and monetary data to appear to end users

Choose a locale that provides the culture-specific information for the language, territory, and code set that the application is to support. Locale files are located in various subdirectories under the gls directory of the INFORMIXDIR directory.

Important: Informix defines and preprocesses these locale files. You cannot modify Informix locales.
At run time, a database application uses the following locales.
Client locale
The locale that the database application uses for locale-specific information.
The application uses the client locale to obtain:
  • The code set for read and write (I/O) operations on the client computer.
  • The format for literal data strings (data formats).
  • The code set for embedded SQL statements, host variables, and data sent to or received from the database server.
Database locale
The locale that the database uses for its data.
The application uses the database locale to obtain the code set for:
  • Data sent to or received from the database server.
  • Names of database objects, such as databases, tables, columns, and views.

If this code set is different from the client code set, the application must perform code-set conversion.

Server locale
The locale that the database server uses for locale-specific information.

When the client application establishes a connection, the database server uses the client locale, database locale, and server locale to determine the server-processing locale for this connection. The database server uses the server-processing locale for its own internal sessions and for access to any database that the connection opens.

At run time, an application obtains the locales that it needs from its application environment. You establish the locales of the application environment as follows.
Locale Default locale Nondefault locale
Client locale U.S. English Set the CLIENT_LOCALE environment variable to the name of the locale you want.
Database locale U.S. English Set the DB_LOCALE environment variable to the name of the locale you want.
Server locale U.S. English Set the SERVER_LOCALE environment variable to the name of the locale you want.

At run time, an internationalized program makes no assumptions about how these locales are set. Once the program environment specifies the locales to use, the application can access the correct GLS locale files for locale-specific information. As long as Informix provides a GLS locale that supports a particular language, territory, and code set, the program can obtain the locale-specific information dynamically.

The current processing locale (sometimes called the current locale) is the locale currently in effect for an application. It is based on one of the following environments:
  • The client environment

    ESQL/C creates client applications. Therefore, the current processing locale for ESQL/C applications is the client locale.

    The current processing locale for DataBlade® client applications is the client locale.

  • The database that the database server is currently accessing

    The current processing locale for DataBlade UDRs is the server-processing locale, which the database server determines from the client, database, and server locales.

For more information about the default locale, client locale, database locale, server locale, server-processing locale, or any of the locale environment variables, see the Informix GLS User's Guide.