Internationalization and localization tools


Locale-Sensitive Windows C++ Format Methods

void Format(LPCTSTR lpszFormat, ...);

void Format(UINT nFormatID, ...);

void FormatV(LPCTSTR lpszFormat, va_list argList);

Internationalization (I18n) Method Overview

These methods write formatted data to a CString in the same way that the sprintf and vsprintf functions format data into a C-style character array.

Format formats the CString according to the corresponding format specification in lpszFormat or from the string resource identified by nFormatID. It is a wrapper method for the Generic C function, sprintf.

FormatV formats the CString according to the corresponding format specification in lpszFormat. It is a wrapper method for the Generic C function, vsprintf.

These methods are part of the CString class. For more information on these and other CString methods see the MSDN Library.

I18n Issues

These methods are all wrappers for their associated Generic C functions. In other words, the actual function that is called is dependent on the _MBCS and _UNICODE compiler flags. In an _MBCS compile, the methods will call the MBCS C functions; in a _UNICODE compile, the wide-character functions will be called.

See String Formatting in C and C++ for a discussion on locale-sensitive formatting in internationalized applications.

Locale-Sensitive Windows C++ Methods

 

Lingoport internationalization and localization services and software