Re: parameterized translation strings; what is the solution?



У нед, 27. 05 2007. у 17:21 -0500, Paul Elliott пише:

[snip]
> What is the solution that is used everyday in the real world?

In my world :), I use this function:

Glib::ustring
i18n_printf(const Glib::ustring& format, ...)
{
	va_list args;
	va_start(args, format);
	gchar* cstr = g_strdup_vprintf(format.c_str(), args);
	Glib::ustring str(cstr);
	g_free(cstr);
 
	return str;
}

    Marko




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]