wxGetWorkingDirectory( cwd , sizeof( cwd ) ) ;
searchPath << GetAllMsgCatalogSubdirs(cwd, lang);
// generic search paths could be somewhere in the system folder preferences
-#else
+#else // !Mac
searchPath << GetAllMsgCatalogSubdirs(wxT("."), lang);
+#ifdef __UNIX__
// and finally add some standard ones
searchPath
+ << GetAllMsgCatalogSubdirs(wxString(wxGetInstallPrefix()) + wxT("/share/locale"), lang)
<< GetAllMsgCatalogSubdirs(wxT("/usr/share/locale"), lang)
<< GetAllMsgCatalogSubdirs(wxT("/usr/lib/locale"), lang)
<< GetAllMsgCatalogSubdirs(wxT("/usr/local/share/locale"), lang);
-#endif
+#endif // __UNIX__
+
+#endif // platform
+
return searchPath;
}
const wxChar *retloc;
// Set the locale:
-#ifdef __UNIX__
+#if defined(__UNIX__) && !defined(__WXMAC__)
if (language == wxLANGUAGE_DEFAULT)
locale = wxEmptyString;
else
size_t i = 0,
count = ms_languagesDB->GetCount();
-#if defined(__UNIX__)
+#if defined(__UNIX__) && !defined(__WXMAC__)
// first get the string identifying the language from the environment
wxString langFull;
if (!wxGetEnv(wxT("LC_ALL"), &langFull) &&
}
}
#elif defined(__WXMAC__)
- char* lc = NULL ;
+ const char* lc = NULL ;
long lang = GetScriptVariable( smSystemScript, smScriptLang) ;
switch( GetScriptManagerVariable( smRegionCode ) ) {
case verUS :
}
else
{
- encname = wxConvLibc.cMB2WX(alang);
+ encname = wxString::FromAscii( alang );
}
}
else
// if we can't get at the character set directly, try to see if it's in
// the environment variables (in most cases this won't work, but I was
// out of ideas)
- wxChar *lang = wxGetenv(wxT("LC_ALL"));
- wxChar *dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL;
+ char *lang = getenv( "LC_ALL");
+ char *dot = lang ? strchr(lang, '.') : (char *)NULL;
if (!dot)
{
- lang = wxGetenv(wxT("LC_CTYPE"));
+ lang = getenv( "LC_CTYPE" );
if ( lang )
- dot = wxStrchr(lang, wxT('.'));
+ dot = strchr(lang, '.' );
}
if (!dot)
{
- lang = wxGetenv(wxT("LANG"));
+ lang = getenv( "LANG");
if ( lang )
- dot = wxStrchr(lang, wxT('.'));
+ dot = strchr(lang, '.');
}
if ( dot )
{
- encname = dot+1;
+ encname = wxString::FromAscii( dot+1 );
}
}
#endif // Win32/Unix
if ( szDomain != NULL )
{
- wxLogDebug(_T("string '%s' not found in domain '%s' for locale '%s'."),
- szOrigString, szDomain, m_strLocale.c_str());
+ wxLogTrace(_T("i18n"),
+ _T("string '%s' not found in domain '%s' for locale '%s'."),
+ szOrigString, szDomain, m_strLocale.c_str());
}
else
{
- wxLogDebug(_T("string '%s' not found in locale '%s'."),
+ wxLogTrace(_T("i18n"),
+ _T("string '%s' not found in locale '%s'."),
szOrigString, m_strLocale.c_str());
}
}