Internationalization and localization tools


Locale-Sensitive Win32 C++ Functions

Internationalization (I18n) Discussion:

This category of functions allows access to the resources and features of the Windows operating system. They accommodate single byte, multibyte, and wide characters, with the Generic version of a function mapping to either the narrow (ANSI) or wide (Unicode) version, depending on the #define UNICODE setting. It is best to use the Generic version whenever possible and use the flag for mapping to the desired target platform function.

The narrow version of the function handles the single-byte and multibyte-character strings. However, although these routines operate on multibyte strings, function length arguments and returns are always in number of bytes, and care should be taken to ensure that sufficient buffer size is allocated for multibyte strings and that length returns are used correctly. For example, the number of bytes is not assumed to be the number of multibyte characters. In the case of the wide version of the function, length arguments and returns are in WCHARs, which are 2-byte values. See Locale-Sensitive Length Functions for additional discussion on single-byte, multibyte, and wide-character strings.

In addition, this class of functions operates based upon the Windows language or locale settings. For internationalized software, the locale must be properly implemented for these functions to work correctly. See Windows C++ Locale Functions for more information.

To run a UTF-16 Unicode application on a Windows platforms where the native encoding is not Unicode, such as Windows 95/98/ME, use the Microsoft Layer for Unicode.

Click on a function for more information:

CharLower

CharLowerBuff

CharNext

CharNextExA

CharPrev

CharPrevExA

CharUpper

CharUpperBuff

CompareString

FindResource, FindResourceEx

FoldString

FormatMessage

GetCalendarInfo

GetCurrencyFormat

GetDateFormat

GetNumberFormat

GetStringTypeA

GetStringTypeEx

GetStringTypeW

GetTimeFormat

IsCharAlpha

IsCharAlphaNumeric

IsCharLower

IsCharUpper

IsDBCSLeadByte

IsDBCSLeadByteEx

LCMapString

lstrcat

lstrcmp

lstrcmpi

lstrcpy

lstrcpyn

lstrlen

MultibyteToWideChar

StrCatBuff

StrNCat

WideCharToMultibyte

wnsprintf

wsprintf

wvnsprintf

wvsprintf

 

 Locale-Sensitive C++ Methods

 

Lingoport internationalization and localization services and software