]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/intl.cpp
Bring through upstream version tagged PKGCONF_0_20.
[wxWidgets.git] / src / common / intl.cpp
index a5e863883ef101a092fddaf9fdbca443b00e3707..2bb34b78cf162eea0ed40c9be8237b330aef33fe 100644 (file)
@@ -1583,11 +1583,13 @@ bool wxLocale::Init(const wxChar *szName,
 
     // there may be a catalog with toolkit specific overrides, it is not
     // an error if this does not exist
-    if ( bOk && wxTheApp )
+    if ( bOk )
     {
-      wxAppTraits *traits = wxTheApp->GetTraits();
-      if (traits)
-        AddCatalog(traits->GetToolkitInfo().name.BeforeFirst(wxT('/')).MakeLower());
+      wxString port(wxPlatformInfo().GetPortIdName());
+      if ( !port.empty() )
+      {
+        AddCatalog(port.BeforeFirst(wxT('/')).MakeLower());
+      }
     }
   }