]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/intl.cpp
compate charset names case-insensitively in GetEncodingFromName()
[wxWidgets.git] / src / common / intl.cpp
index 8aeb57fbe9f90edf4c1ee4aedff8be694abab5c7..1f360d9a5a4d7c3c966ea1c6cd52ae6a7bb2d753 100644 (file)
@@ -79,6 +79,8 @@
 #include "wx/encconv.h"
 #include "wx/hashmap.h"
 #include "wx/ptr_scpd.h"
+#include "wx/app.h"
+#include "wx/apptrait.h"
 
 #if defined(__WXMAC__)
   #include  "wx/mac/private.h"  // includes mac headers
@@ -1470,8 +1472,19 @@ bool wxLocale::Init(const wxChar *szName,
   m_pMsgCat = NULL;
   bool bOk = true;
   if ( bLoadDefault )
+  {
     bOk = AddCatalog(wxT("wxstd"));
 
+    // there may be a catalog with toolkit specific overrides, it is not
+    // an error if this does not exist
+    if ( bOk && wxTheApp )
+    {
+      wxAppTraits *traits = wxTheApp->GetTraits();
+      if (traits)
+        AddCatalog(traits->GetToolkitInfo().name.BeforeFirst(wxT('/')).MakeLower());
+    }
+  }
+
   return bOk;
 }