Re: Volunteer needed (was Re: Short question about german special characters with GTK 2)



On Wed, Mar 05, 2003 at 10:36:06AM -0500, Owen Taylor wrote:
It would be wonderful if someone would:

 - Write up a FAQ entry on this

   (Maybe explain what is UTF-8, that GTK+ uses UTF-8 everywhere,
    short example of g_locale_to_utf8(), short example of g_convert(),
    mention that you could just encode your source file as 
    UTF-8 if your editor supports it.)

 - File it as a bug in bugzilla, CC'ing gale gtk org

This certainly seems to be the most frequently asked question
these days.

Actually, if the OP would do proper i18n/l10n initialization with gettext,
and mark the strings for translation instead of passing them in as-is,
would this still be a problem?

On Wed, 2003-03-05 at 10:03, Christian Schneider wrote:

dateiauswahl = gtk_file_selection_new ("Auswahl der zu
übertragenden Datei");

This may work:

bindtextdomain (PACKAGE, LOCALEDIR);
bind_textdomain_codeset (PACKAGE, "UTF-8"); /* <-- This is the one */
textdomain (PACKAGE);
...
dateiauswahl = gtk_file_selection_new (_("...übertragenden Datei"));

Don't forget to define PACKAGE & LOCALEDIR and _().

I said "may work", because in my case I'm passing in plain ASCII strings
and the latin-1 ones are in the .po files. Does anyone know if it still
works when passing in latin-1 in the code itself?


Regards,

Filip

-- 
If NT is the answer, you didn't understand the question.



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