Summary
- Globalized programs need to support a variety of cultural
and linguistic conventions. The Win32 NLSAPI provides
generic support for date, time, calendar, number, and
currency formats, as well as for sorting, character
typing, and character mapping.
- The NLSAPI exists in two forms: A and
W. Windows NT supports both sets of API entry
points. Win32s and Windows 95 support the A
versions.
- The NLSAPI allows you to write generic code that will
correctly display international data carried by the
system, even if that information is added to the system
after your application is complete.
- The system carries default formatting information for
date, time, currency, and numbers. The user can change
some of the default settings using Control Panel.
- Applications can customize date and time formats with
picture strings. They can create custom number and
currency formats using the system-defined NUMBERFMT and
CURRENCYFMT structures.
- You can tag document text streams with locale IDs, just
as you would store font information. Your application can
use these locale IDs when calling NLSAPI functions and
when determining which algorithms to use for spelling and
other text analysis.
- Creating sort keys with LCMapString is a fast way
to sort large sets of strings. Sort keys automatically
handle locale-related idiosyncrasies.
- When developing a single binary to run on Win32s, Windows
95, and Windows NT, be aware that there are slight
variations in the national language support available on
each platform.
- The NLSAPI calls will help you write global code, but
your application will probably require language-related
adjustments that the NLSAPI does not address.