From 03443829ac3e79461814da084e01060ddc7e60dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karsten=20Ball=C3=BCder?= Date: Thu, 19 Aug 1999 14:10:22 +0000 Subject: [PATCH] Added support for locales like de_AT.iso-8859-1 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/intl.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/common/intl.cpp b/src/common/intl.cpp index a63fa77a05..ec2362d7e8 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -300,9 +300,18 @@ static wxString GetFullSearchPath(const wxChar *lang) } // open disk file and read in it's contents -bool wxMsgCatalog::Load(const wxChar *szDirPrefix, const wxChar *szName) +bool wxMsgCatalog::Load(const wxChar *szDirPrefix, const wxChar *szName0) { + /* We need to handle locales like de_AT.iso-8859-1 + For this we first chop off the .CHARSET specifier and ignore it. + FIXME: UNICODE SUPPORT: must use CHARSET specifier! + */ + wxString szName = szName0; + if(szName.Find('.') != -1) // contains a dot + szName = szName.Left(szName.Find('.')); + // FIXME VZ: I forgot the exact meaning of LC_PATH - anyone to remind me? + // KB: search path where to find the mo files, probably : delimited #if 0 const wxChar *pszLcPath = wxGetenv("LC_PATH"); if ( pszLcPath != NULL )