Make wxLanguageInfo::GetLocaleName() consistent across platforms
Check that the locale can be indeed set to the given string in Unix version too, there doesn't seem to be any good reason to do it for MSW only.
This commit is contained in:
@@ -72,17 +72,11 @@ struct WXDLLIMPEXP_BASE wxLanguageInfo
|
||||
#endif // __WINDOWS__
|
||||
|
||||
// return the locale name corresponding to this language usable with
|
||||
// setlocale() on the current system
|
||||
// setlocale() on the current system or empty string if this locale is not
|
||||
// supported
|
||||
wxString GetLocaleName() const;
|
||||
};
|
||||
|
||||
// for Unix systems GetLocaleName() is trivial so implement it inline here, for
|
||||
// MSW it's implemented in intl.cpp
|
||||
#ifndef __WINDOWS__
|
||||
inline wxString wxLanguageInfo::GetLocaleName() const { return CanonicalName; }
|
||||
#endif // !__WINDOWS__
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxLocaleCategory: the category of locale settings
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user