Make Your Program International
You can make your program adapt to different
cultural environments by using locales and taking advantage of
other features provided by VisualAge C++ to support
internationalization.
To make your program international, complete
the following steps:
- Isolate your Machine Readable Information
(MRI) from the executable code at the source level and at
the module level.
By isolating your MRI at the source level, it can be
translated easily into many languages. If the MRI is
isolated from the executable code at the load module
level, it is possible for the appropriate language
version of the MRI to be loaded at execution time.
- Respect your user's culture and
conventions by using setlocale to select the appropriate locale
categories during program
execution.
The VisualAge C++ localization model provides the
standard locale categories, each of which defines one
aspect of the cultural environment, as well as some IBM
extensions. The default environment in which programs run
is the POSIX C Locale, which
conforms to US English conventions. VisualAge C++
includes a large number of additional locales that define
many national environments. You can use any of these, or
modify one to create your own.
If
you are shipping a Locale for the Windows operating
system, you must also supply locale DLLs with your
Program.
- Code your program to use the VisualAge C++
locale-sensitive
interfaces provided by
functions in the run-time library.
These functions conform to the XPG4 standard. Call
functions to select locale categories, and to manipulate
characters, date and time data, monetary and numeric
quantities, and other locale-sensitive data, as required
by your cultural environment.
- To convert data from one code set to
another, use the VisualAge C++ code set conversion
utility and functions. VisualAge C++ provides code set
converters that allow you to convert to and from many
different coded character sets, including Unicode, and a
utility to define your own conversion table.
For more information on designing an
internationalized application, see IBM's "National
Language Design Guide - Designing Internationalized Products,
SE09-8001".
Note: VisualAge C++ also supports the C++
Localization library, as recommended by the ANSI committee in the
December 1996 draft.

Internationalization
Localization
and Locales

Select a Locale
Convert
Character Coding
Supply DLLs to Support Locales

Locale
Categories
Locale-Sensitive
Interfaces