adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] i18n improvements


From: Kai Sterker
Subject: Re: [Adonthell-devel] i18n improvements
Date: Sat, 13 Apr 2002 16:58:12 +0200

On 13 Apr 2002 14:11:22 +0200 Alexandre Courbot wrote:

> > I also changed the directory that'll contains the message catalogue
> > to<gamedir>/po/<country code>/LC_MESSAGES/ as Alex suggested. So put
> > your translations in there to work.
> 
> I've copied my wastesedge.mo file into
> <adonthell-dir>/games/wastesedge/po/fr/LC_MESSAGES/wastesedge.mo, but
> it doesn't work - sadly remains in English. Maybe the dialog file
> needs to be recompiled, as it didn't use our gettext interface?

It's weird. I did some tests and found out that stuff is only working if
I 'export LANG=de_DE' or 'address@hidden'. Latter is set automatically
in my .profile. As soon as I unset it, translation stopped working.
However, since it worked with $LANG set, it's certain that the
wastesedge.mo in the <wastesedge>/po/.../ directory is found.

So I made some more tests and read 'man setlocale' and figured that
setlocale (LC_MESSAGES, "") will set the locale to 'C' unless it finds
the LANG or the LC_MESSAGES variable defined. The man page further said
that 'C' allows one to use any locale, but obviously that does not work
as expected.

The only solution I found is to explicitly pass the locale to use to
setlocale. Note that a simple 'de' or 'fr' isn't a proper locale. You'll
have to use 'fr_FR' at least. Then it should work. That does not affect
the actual locale directory though. You can still name that 'fr'.


Now that it is working, I would like to test whether changing language
on the fly works as well. So can you please send me your french
catalogue to test with? I'm too lazy to make a different translation
myself.

 
> Something else - that's detail though - is that maybe locale would be
> better than po for the locales directory name, as po designates the
> files that are to be translated.

Yeah, you are right. I changed that, so be sure to update it on your box
too.


Kai



reply via email to

[Prev in Thread] Current Thread [Next in Thread]