adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] i18n improvements


From: Alexandre Courbot
Subject: Re: [Adonthell-devel] i18n improvements
Date: 13 Apr 2002 18:54:37 +0200

> > 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.

Never mind! It's just me being stupid. See, I ran adonthell with -g to
the wastesedge cvs directory. But I made the po structure in my copy in
/usr/share/adonthell. Sorry! :p

You're right however with the de/de_DE stuff. On my box, LC_ALL is set
to fr_FR, and I directly get the translations. But if I set it to fr
alone, I play in English.

> 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.

I thought 'C' was the 'default' language - that is, it talks in the
language the program was programmed in.

> 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.

Sure. Actually I only translated two sentences at first, but just for
you I've finished demo_intro_1 and talan_start ;) Have fun! (attached to
the mail, if I haven't forgot) I put no accents yet, as they are encoded
in UTF-8 and cause the window system to insert line jumps and such weird
stuff. Until we get a proper font! I propose we encode in Latin-1 for
this release, as we'll have true type support, but probably not Unicode
in the Windows system. And no exotic languages are planned for 0.3,
so...

I guess the only way for Windows players to have a custom language will
be to set it in the configuration file, as the environment variables are
not set correctly, contrary to Linux distros which set them correctly at
install and user login.

Wow, just played a bit with my translation. I'm really amazed by
gettext. No overhead, and the plot is much easier to understand for us
who doesn't fully master English. It's much smoother to play. Gettext
rules!

... on the other hand, there is A LOT of stuff to translate. Only Talan
is 109 sentences already!

Alex.
-- 
http://www.gnurou.org

Attachment: wastesedge.po
Description: Text document


reply via email to

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