Internationalization and localization tools


String Format Function

int obstack_printf(struct obstack *obstack, const char *template, ...);

Internationalization (I18n) Function Overview

The obstack_printf function is similar to asprintf, except that it uses the obstack obstack to allocate the space.

See Obstacks for details on creating an obstack for this function.

I18n Issues

Use the appropriate version of the function as required for internationalization support, noting the following:

Prior to calling this function, ensure that the current locale is set properly by calling setlocale, as string formatting is dependent on the LC_NUMERIC locale category. See String Formatting in C and C++ for a discussion on locale-sensitive formatting in internationalized applications.

There is no ANSI wide character version of this function. The parameters will have to be converted to multibyte UTF-8 characters and then the obstack_printf function can be used.

Recommended Replacements*

*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.

String Format Functions

 

Lingoport internationalization and localization services and software