Locale-Sensitive Function
struct lconv *localeconv(void);
Internationalization (I18n) Function Overview
In conjunction with the setlocale function, the localeconv function returns a pointer to a structure whose components contain information about how numeric and monetary values should be formatted in the current locale.
localeconv is available on both Windows and Unix-based platforms.
I18n Issues
While localeconv is portable, it is expensive to use, not extendable, and not generally usable as it provides access to only LC_MONETARY and LC_NUMERIC related information. For example, the function strfmon formats monetary amounts according to the selected locale using this information.
If an application needs to be portable, localeconv can be useful for many locale-sensitive formatting needs. If a cross-platform code base is not necessary, other alternatives such as those that follow should be considered.
In a Windows-only environment, a more efficient and flexible alternative to localeconv is to use the native NLS (National Language Support) functions. For example, the LCID-based SDK functions such as GetCurrencyFormat .
In most Unix environments, the nl_langinfo function is available and is faster and more flexible approach to formatting locale-sensitive data.
Recommended Replacements*
*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.
Locale-Sensitive Functions
|