[Top][All Lists]

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

Re: [bug-gettext] gettext don't try to open a mo file ..... why ?

From: Daiki Ueno
Subject: Re: [bug-gettext] gettext don't try to open a mo file ..... why ?
Date: Mon, 09 Jun 2014 15:23:15 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Micka <address@hidden> writes:

>         In my mlinux c program, I included those two files :


>         then I've done that :
>         acTest= setlocale(LC_ALL,"");


>         Just after, I set my language with :
>         setenv ("LANGUAGE", acLanguage, 1);

I guess this is the problem.  The gettext functions pick the
translations according to the current locale setting.  However, just
setting the LANGUAGE environment variable does not affect the setting.
You need to either call setlocale after that, or run your program with
the environment variable set:

  $ LANGUAGE=zh_TW ./yourprogram

Since you are on Debian, I'd suggest to look at the example in the
gettext-doc package, located at:


and also read the documentation of how to localize your program:


Daiki Ueno

reply via email to

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