Re: How to internationalize a shared library



On Wed, 24 Jun 2009 16:37, rainwoodman gmail com said:
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. 

It is perfectly okay to bind the domain to the library.  In the library
you need to do 2 things:

1. Bind the domain to the library:

    bindtextdomain (PACKAGE, LOCALEDIR);

   This needs to be done once by an initialization function.

2. Use
 
    dgettext (PACKAGE, "some string")

   instead of gettext () or an appropriately adjusted _() macro.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.




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