Re: How to internationalize a shared library
- From: jvetterli gmail com
- To: gtk-app-devel-list gnome org
- Subject: Re: How to internationalize a shared library
- Date: Wed, 24 Jun 2009 11:12:33 -0400
On Wed, Jun 24, 2009 at 08:48:23PM +0800, Zhihai Wang wrote:
Anyone knows?
Should I also do following as what I did to internationalize an application?
setlocale(LC_ALL, "");
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
textdomain(GETTEXT_PACKAGE);
Will there be any problem to call these APIs above?
I would remove the call to setlocale, since this will probably by done
by the application (or by gtk_init).
Remove the call to textdomain -- the application will call that for its
own domain. Instead of using gettext, use dgettext (or g_dgettext), and
pass the libraries' domain as the first parameter.
HTH
JV
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]