Standard gettext PO format

Nicolas Goutte nicolasg at snafu.de
Fri Dec 30 12:17:30 GMT 2005


On Thursday 29 December 2005 16:14, Chusslove Illich wrote:
> > [: Nicolas Goutte :]
> > As for different languages, for what I understand $LANGUAGE behaves like
> > this, at least according to the man page gettext(3). Perhaps it should
> > be seen if in reality, it really behaves like that.
>
> It does, I've just checked, my oversight. But it also requires that all
> languages of the requested catalog are in the same directory, as
> bindtextdomain takes only catalog name and directory name.

I have just read quikly bindtextdomain(3) but at first glance, you can set a 
base directory and then Gettext will handle the language by itself.

> KDE is just
> locating xx/LC_MESSAGES/catalog.mo in resource dirs.

But if you give the resource dir to bindtextdomain, will it not be the same? 
Or very similar? (It is not exactly a problem if we need to change where KDE 
installs the *.gmo files.)

>
> Hm, for a known catalog directory and catalog language, perhaps I could
> call bindtextdomain and setenv("LANGUAGE", xx) prior to gettext call.

I suppose that $LANGUAGE should be defined very early while loading KDE.
(However I do not exactly where, as KDE's initialization is not a part of KDE 
that I know well. Also changing the KControl setting should set it too, 
somehow.)

Have a nice day!





More information about the kde-core-devel mailing list