informix
Informix Guide to GLS Functionality
GLS Fundamentals

Using the GLS Feature

In a database application, some of the tasks that the database server and the client application perform depend on the language and culture conventions of the data that they handle. For example, the database server must sort U.S. English data differently than Korean character data. The client application must display French currency differently than English currency.

If the Informix database server or client product included the code to perform these data-dependent tasks, each would need to be written specially to handle a different set of culture-specific data.

With support for GLS, Informix products no longer need to specify how to process culture-specific information directly. Culture-specific information resides in a GLS locale. When an Informix product needs culture-specific information, it calls the GLS library, which accesses the GLS locale and returns the information to the Informix product.

The GLS feature is a portable way to support culture-specific information. Although many operating systems provide support for non-English data, this support is usually in a form that is specific to the operating system. Not many standards yet exist for the format of culture-specific information. This lack of conformity means that if you move an application from one operating-system environment to another, you might need to change the way in which the application requests language support from the operating system. You might even find that the new operating-system environment does not provide the same aspect of language support that the initial environment provided.

The GLS feature can access culture-specific information on a UNIX or Windows NT operating system. Informix products can locate the locale information on any platform to which they are ported.

In order for GLS to support a nondefault locale, the version of Windows NT that you are using must also support that locale. That is, you cannot support a Japanese client application on Windows NT unless that application is running on the Japanese version of Windows NT.

To use the GLS feature, the tasks that you need to perform depend on whether you are a system administrator, database administrator, end user of a client application, end user of a database server utility, or client application developer. The following table lists these optional and mandatory tasks.

Audience Optional Tasks Mandatory Tasks
System administrator, database administrator, or end user of client application
  • To set nondefault locales, set the CLIENT_LOCALE, DB_LOCALE, and SERVER_LOCALE environment variables.
  • To customize end-user formats, set the GL_DATE, GL_DATETIME, and DBMONEY environment variables. For ESQL/C, you can set DBTIME instead of GL_DATETIME.
  • To configure a GLS environment for ESQL/C, set the CC8BITLEVEL and ESQLMF environment variables.
  • To perform additional configuration for the GLS environment, set the DBLANG and GLS8BITFSYS environment variables.
  • To issue an SQL statement, follow the guidelines in Chapter 3, SQL Features, and Chapter 4, Database Server Features.
  • To remove GLS files, follow the guidelines in Removing Unused Files.
  • To get information about GLS files on UNIX, follow the guidelines in The glfiles Utility.
  • None
  • End user of database server utility Same as above Follow the guidelines in Locale-Specific Support for Utilities.
    Client application developer
  • Same as above
  • To develop an internationalized client application, follow the guidelines in Internationalizing Client Applications and the Informix GLS Programmer's Manual.
  • Follow the guidelines in Chapter 5, General SQL API Features.
  • For an ESQL/C application, also follow the guidelines in Chapter 6, Informix ESQL/C Features.
  • GLS Support by Informix Products

    Informix provides GLS support in the following types of products and utilities:

    The following sections outline the features that GLS support provides for the first two types of Informix products. For information about how to migrate a database server whose databases contain non-English data, see the Informix Migration Guide.

    Informix Database Servers

    Informix introduced GLS in OnLine Dynamic Server. Previously, Informix provided ALS language support for non-English databases with Asian (multibyte) characters and NLS language support for non-English databases with single-byte characters. GLS is a single feature that provides support for single-byte and multibyte data in non-English languages. For backward compatibility, GLS products also support all of the NLS environment variables and a subset of the ALS environment variables. For a list of these variables, see the Informix Migration Guide.

    Culture-Specific Features

    With the GLS feature, Informix database servers provide support for the following culture-specific features:

    Informix Client Applications and Utilities

    In general, a client application is a program that runs on a workstation or a PC on a network. To the GLS feature, a client application can be either an Informix SQL API product (such as Informix ESQL/C) or an Informix database server utility (such as DB-Access, dbexport, or onmode). The following Informix client applications provide support for the GLS feature:

    The Informix GLS Application Programming Interface

    Informix GLS is an application programming interface (API) that lets DataBlade module developers and ESQL/C programmers develop internationalized applications with a C-language interface. The macros and functions of Informix GLS provide access within an application to GLS locales, which contain culture-specific information. You can use Informix GLS to write programs (or change existing programs) to handle different languages, cultural conventions, and code sets.

    All Informix GLS functions access the current processing locale, which is the locale that is currently in effect for an application. It is based on either the client locale (for ESQL/C client applications and client LIBMI applications) or the server-processing locale (for DataBlade user-defined routines).

    Informix GLS provides macros and functions to help you perform the following internationalization tasks:

    Informix client applications as well as database servers can access Informix GLS. For applications, you link the Informix GLS library to your application to perform locale-related tasks. Informix database servers automatically include the Informix GLS library. For more information, see the Informix GLS Programmer's Manual.

    Supported Data Types

    The GLS feature supports the following data types:

    Additional GLS Support

    Informix products include a core set of GLS locale files, which is a subset of available Informix locales.The core set consists of the default locale and most locales to support English, Western European, Eastern European, Asian and Arabic territories. If you do not find a locale to support your language and territory, you can get additional locales in the International Language Supplement (ILS) product.

    The International Language Supplement provides all available GLS locales and code-set conversion files. It also includes error messages to support several European languages.

    For more information about available GLS locales and Informix Language Supplements, contact your Informix sales representative. For more information about how to create customized message files, see Locating Message Files.


    Informix Guide to GLS Functionality, Version 9.2
    Copyright © 1999, Informix Software, Inc. All rights reserved