]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/intl.cpp
Implement GetValue() and SetValue() and send an event when clicked
[wxWidgets.git] / src / common / intl.cpp
index aef903c92b6b1562096842fa75e2e75d20a3e4d6..1fd78f7aca0c3a6876952a91142790943ee463f0 100644 (file)
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "intl.h"
 #endif
 
@@ -683,11 +683,27 @@ bool wxLocale::Init(const wxChar *szName,
 static wxWCharBuffer wxSetlocaleTryUTF(int c, const wxChar *lc)
 {
     wxMB2WXbuf l = wxSetlocale(c, lc);
-    if ( lc && lc[0] != 0 && !l )
+    if ( !l && lc && lc[0] != 0 )
     {
        wxString buf(lc);
-       buf += wxT(".utf8");
-       l = wxSetlocale(c, buf.c_str());
+        wxString buf2;
+       buf2 = buf + wxT(".UTF-8");
+       l = wxSetlocale(c, buf2.c_str());
+        if ( !l )
+        {
+            buf2 = buf + wxT(".utf-8");
+           l = wxSetlocale(c, buf2.c_str());
+        }
+        if ( !l )
+        {
+            buf2 = buf + wxT(".UTF8");
+           l = wxSetlocale(c, buf2.c_str());
+        }
+        if ( !l )
+        {
+            buf2 = buf + wxT(".utf8");
+           l = wxSetlocale(c, buf2.c_str());
+        }
     }
     return l;
 }