Micka <[email protected]> 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:

  /usr/share/doc/gettext-doc/examples/hello-c

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

  https://gnu.org/software/gettext/manual/gettext.html#Maintainers

Regards,
--
Daiki Ueno

Reply via email to