add wxLanguageInfo::GetLocaleName(), this simplifies the current code and will be used with wxXLocale

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-02-11 23:40:03 +00:00
parent ea65760d5c
commit 86d62b51c0
2 changed files with 60 additions and 29 deletions

View File

@@ -332,8 +332,18 @@ struct WXDLLIMPEXP_BASE wxLanguageInfo
// return the LCID corresponding to this language
wxUint32 GetLCID() const;
#endif // __WXMSW__
// return the locale name corresponding to this language usable with
// setlocale() on the current system
wxString GetLocaleName() const;
};
// for Unix systems GetLocaleName() is trivial so implement it inline here, for
// MSW it's implemented in intl.cpp
#ifndef __WXMSW__
inline wxString wxLanguageInfo::GetLocaleName() const { return CanonicalName; }
#endif // !__WXMSW__
// ----------------------------------------------------------------------------
// wxLocaleCategory: the category of locale settings
// ----------------------------------------------------------------------------