|
From: raananb on 20 Apr 2008 11:07 on the basis of the example in the wxWidget book I set up a sngle-selection wxListbox with English, French and Hungarian elements, and the event handler below: void PixName::OnListbox1Selected( wxCommandEvent& event ) { if (m_locale != NULL) delete m_locale; int Rank = lb_Languages->GetSelection(); switch(Rank) { case 0: // English m_locale = NULL; break; case 1: // French m_locale = new wxLocale(wxLANGUAGE_FRENCH); m_locale->AddCatalogLookupPathPrefix(ApplicationPath); m_locale->AddCatalog(wxT("PixName3")); break; case 2: // Hungarian m_locale = new wxLocale(wxLANGUAGE_HUNGARIAN); m_locale->AddCatalogLookupPathPrefix(ApplicationPath); m_locale->AddCatalog(wxT("PixName3")); break; } SwitchLanguage(); // refreshes the displayed language elements } There are 'fr' and 'hu' folders at the executable level. This setup works fine under Vista. However, under Linux, switching back and forth works fine between English and French, but trying to switch to Hungarian produces "Cannot set locale to 'hu-HU'." Any ideas? wxWidgets 2.8.7, GCC -- View this message in context: http://www.nabble.com/wxLocale-%22cannot-set-locale%22-tp16793240p16793240.html Sent from the wxWidgets - Users mailing list archive at Nabble.com.
From: Andreas Mohr on 20 Apr 2008 15:59 Hi, On Sun, Apr 20, 2008 at 08:42:56AM -0700, wx-users-request(a)lists.wxwidgets.org wrote: > Date: Sun, 20 Apr 2008 08:07:39 -0700 (PDT) > From: raananb <raanan(a)barzel.org> > Subject: wxLocale "cannot set locale" > To: wx-users(a)lists.wxwidgets.org > Message-ID: <16793240.post(a)talk.nabble.com> > Content-Type: text/plain; charset=us-ascii > There are 'fr' and 'hu' folders at the executable level. > > This setup works fine under Vista. > > However, under Linux, switching back and forth works fine between English > and French, but trying to switch to Hungarian produces "Cannot set locale to > 'hu-HU'." > > Any ideas? System setup issue. Make sure to properly generate the hu-HU locale definitions. On Debian-based systems, this can mean trying something like dpkg-reconfigure localeconf dpkg-reconfigure locales localedef ... I'd suggest querying your favourite distribution forum about this. HTH, Andreas Mohr
|
Pages: 1 Prev: wxSplitterWindow gravity? Next: blit and BufferedPaintDC |