[maemo-developers] how to change the language of the program during run time?
From: mohamed ismael mohamed.ismael at asgatech.comDate: Wed Nov 18 15:48:11 EET 2009
- Previous message: Bug#6203, rotation and OHMD
- Next message: how to change the language of the program during run time?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
hello , i am trying to change the language during run time. i road the documentation of the localization http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Application_Development/Maemo_Localization i generated the *.po file using the command xgettext -f po/POTFILES.in -C -a -o po/template.po and then made a en_GB.po copy of the template then made the ar_Ar.po file which contain my localization the i generated the *.mo file using the following command msgfmt po/fi_FI.po -o debian/myapp/usr/share/locale/fi_FI/LC_MESSAGES/myapp.mo i made the path by hand and run the command so i get myapp.mo file i added the following line on the main before gtk_init() setlocale(LC_ALL, "ar_AR"); bindtextdomain(GETTEXT_PACKAGE, localedir); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); textdomain(GETTEXT_PACKAGE); i added the following line to configure.ac file ALL_LINGUAS="en_GB ar_AR" i built a package and deployed it on N900 device when i setup the package i get the following error but i run the program with the following command LANGUAGE="ar_Ar" myapp the application run and display my language but when i click on a button which contain the following code setlocale(LC_ALL, "en_GB"); it does not make any thing . i have two questions: 1- how to make my program launch with the desired language without the line LANGUAGE="ar_Ar" myapp? 2- how to change the language during run time? thanks
- Previous message: Bug#6203, rotation and OHMD
- Next message: how to change the language of the program during run time?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]