Boost logo

Boost Users :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-10-24 05:54:24


Jens Seidel wrote:

> On Wed, Oct 24, 2007 at 01:31:46PM +0400, Vladimir Prus wrote:
>> Jens Seidel wrote:
>> > On Wed, Oct 24, 2007 at 11:12:28AM +0400, Vladimir Prus wrote:
>> > But a gettext approach uses nearly always macros such as _("") and
>> > N_(""). If Boost would at least mark all translatable texts using _()
>> > or N_() a user who wishs i18n support could define these macros (e.g.
>> > by including first a new boost/i18n.h file) and have messages
>> > translatable.
>> >
>> > but Boost could at least provide PO
>> > files containing translations so that users can merge these with own
>> > files.
>>
>> That's what I have in mind. It's not particularly hard, either,
>> since Boost.Build has support for gettext already. The question is
>> whether the will be objections to using tool that is mostly
>> only available on Linux. And, the model of _("") is somewhat
>
> Only available on Linux? Probably you refer to the gettext system call
> in glibc but isn't/wasn't there also a external library of gettext.
> (I think a separate copy of gettext is part of many packages using
> autotools.)

I mean "by default". On Linux, gettext is pretty much everywhere.
On Windows, developers might be more accustomed to other
mechanisms.

Personally, I think that a solution using gettext is better
than no solution.

>> specific to Linux, I think on windows one has to make integer
>> ids.
>
> Not if a const char* gettext(const char*) function is used there too
> (or are there license issues which make this not possible?).
>
>> Actually, .mo might be of use, too, assuming _("") expands to
>>
>> dgettext("boost", ...)
>>
>> as opposed to
>>
>> gettext(...)
>>
>> which is a good idea anyway. Of course, the main application
>> will be responsible for install .mo files and hooking them in.
>> And given that, .mo is indeed little advantage over translated
>> .po.
>
> I'm not sure whether an application can use multiple message
> catalogs ...

It surely can, when using dgettext to explicitly specify which
domain to grab messages from.

> PS: I could provide the German translation if wanted.

Okay, if we decide to try this, I'll ask you for German translation
for program_options messages ;-)

- Volodya


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net