Shorten lang names in wxTranslations, not wxFileTranslationsLoader.

If a catalog with full language name ("fr_BE") doesn't exist,
wxFileTranslationsLoader tries to look for just the base language ("fr")
too. This isn't something specific to wxFileTranslationsLoader, it makes
sense to do it regardless of the loader.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2010-04-26 20:51:16 +00:00
parent 8dffb6b1a7
commit 076c0a8ee8
2 changed files with 45 additions and 30 deletions

View File

@@ -111,6 +111,9 @@ public:
static const wxString& GetUntranslatedString(const wxString& str);
private:
// perform loading of the catalog via m_loader
bool LoadCatalog(const wxString& domain, const wxString& lang);
// find best translation for given domain
wxString ChooseLanguageForDomain(const wxString& domain,
const wxString& msgIdLang);