Re: How to internationalize a shared library



I am not skillful on this particular issue, but theoretically NO.

Your library will ultimately be linked to an application. The textdomain
should be bound by the application. 
Your library package should be made gettext friendly, aka:
(1) state gettext as an requirement in the pkgconfig file (if you
already require gtk perhaps this is not a must),  don't specify gettext
in LIBADD
(2) label all translatable strings as done in applications
(3) properly initialize intltool in configure.ac as done in application
packages

Good luck,

Yu
On Wed, 2009-06-24 at 20:48 +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?

Thanks.

On Wed, Jun 24, 2009 at 2:26 PM, Zhihai Wang <pageguest gmail com> wrote:

Dear All,

I know the way how to internationalize an application, could anyone tell me
how to do with a shared library I'm going to distribute to 3rd party
applications?


--
Best Regards,

Zhihai Wang








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