Re: Unusual behavior of locale switch in GTK2.0 application



Hello again,
I found solution here:
https://mail.gnome.org/archives/gtk-app-devel-list/2008-May/msg00077.html

" ...
The code in the GNU gettext-runtime that decides what message catalogs
to use calls getenv() to check for values of LC_ALL or LANG
environment variables. So, what you should do is simply:

putenv ("LANG=zh_CN")
..."

I had added
putenv ("LANG=RU")

and
putenv ("LANG=EN")

before bindtextdomain() and localization had became work.


Best regards,

Igor







2017-03-17 12:05 GMT+03:00 Igor Chetverovod <chetverovod gmail com>:

Hello All,
About 5 years ago a had developped win32 application  which is using 2
locales: En and Ru.  Application is using GTK v2.24.10,  glib v.2.28.8.
Lacalization is based on get_text() function and dictionaries genereted by
Poedit. Nullsoft NSIS v3.x script is used for installator generation.
Localization  works good, locale switching too.  Some days ago I had found
laptop with Windows7 which works different from others. Installator of
application does not show messages in russian correctly.Installator issue
was solved by adding string "Unicode true" to the script. But, installed my
application on this laptop does not change locale, all parts of UI stay in
English. Application is using for locale switching code:

bindtextdomain(RU_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(RU_PACKAGE, "UTF-8");
textdomain(RU_PACKAGE);

I did not find a way to solve this issue.  Is there ideas how to overcome
this?

Thanks,
Igor



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