Re: How I can change the translation from the program?
- From: Krzysztof Kosiński <tweenk pl gmail com>
- To: "MysteriousMan ." <yahyai-0 hotmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: How I can change the translation from the program?
- Date: Tue, 2 Aug 2011 18:16:28 +0200
2011/8/2 MysteriousMan . <yahyai-0 hotmail com>:
> I have add the following
>
> setenv("LANG", "ar", TRUE);
> setenv ("LANGUAGE", "ar", TRUE);
>
> The program is in english , and Ar.po exist on po folder
> But the language didn't change even if I restart the program 10 times
That's not everything:
1. You need to call textdomain() to set the translation domain,
usually your app's name, e.g. textdomain("your_app")
2. During build, you need to compile the .po files to .mo files using
msgfmt (there are Autotools scripts to help) and then put them in the
correct directory, e.g.
/usr/local/share/locale/ar/LC_MESSAGES/your_app.mo (make install
should do this for you)
3. The text domain name you've set on program start must match the
name of the .mo file
Regards, Krzysztof
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]