> We've implemented this sort of thing -- a language selector that
> lets you choose between 13 supported languages -- in gretl,
> another GTK app.  I'm not sure we're doing it in the best way, but
> it seems to work OK.  It's definitely fiddly work. To see what we
> did, look at gretl_intl.c, lines 398 to 680.
>
> http://gretl.cvs.sourceforge.net/viewvc/gretl/gretl/lib/src/gretl_intl.c?revision=1.61&view=markup

Thanks for your reply. I was afraid that this was the answer. It's
amazing that this is not a more common question.

This bit of code is what I was thinking about doing already. Glad to
have some confirmation that such an approach is workable.

   char *test = setlocale(LC_ALL, lcode);
  564
  565 # ifndef WIN32
  566     if (test == NULL) {
  567   char lfix[32];
  568
  569   sprintf(lfix, "%s.UTF-8", lcode); /* Ubuntu, grr */
  570   test = setlocale(LC_ALL, lfix);

Thanks again,
Matthew
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to