Re: How to internationalize a shared library

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");
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.


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