]> git.saurik.com Git - wxWidgets.git/commitdiff
ensure that message catalog files are found when the sample is run under Windows
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 17 May 2005 23:42:49 +0000 (23:42 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 17 May 2005 23:42:49 +0000 (23:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/internat/internat.cpp

index d4faa14be2b5069e61be5f710ed8c76a3078056e..f84b7b3aa0115be64288943372ac19240647a049 100644 (file)
@@ -175,6 +175,13 @@ bool MyApp::OnInit()
     if ( lng != -1 )
         m_locale.Init(langIds[lng]);
 
+    // normally this wouldn't be necessary as the catalog files would be found
+    // in the default locations, but under Windows then the program is not
+    // installed the catalogs are in the parent directory (because the binary
+    // is in a subdirectory of samples/internat) where we wouldn't find them by
+    // default
+    wxLocale::AddCatalogLookupPathPrefix(wxT("."));
+    wxLocale::AddCatalogLookupPathPrefix(wxT(".."));
 
     // Initialize the catalogs we'll be using
     m_locale.AddCatalog(wxT("internat"));