Support creating Unix wxUILocale for languages without region
Unlike MSW and macOS, creating wxUILocale for e.g. "en" doesn't necessarily succeed under Linux even if "en_US" is available, so try to find a working language+region combination if just language doesn't work. This requires access to the languages database, so add a private wxGetLanguageInfos() to avoid having to depend on wxLocale just for this.
This commit is contained in:
@@ -12,6 +12,12 @@
|
||||
|
||||
#include "wx/localedefs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/vector.h"
|
||||
|
||||
typedef wxVector<wxLanguageInfo> wxLanguageInfos;
|
||||
|
||||
// Return the vector of all known languages.
|
||||
const wxLanguageInfos& wxGetLanguageInfos();
|
||||
|
||||
// Function returning hard-coded values for the "C" locale.
|
||||
wxString wxGetStdCLocaleInfo(wxLocaleInfo index, wxLocaleCategory cat);
|
||||
|
Reference in New Issue
Block a user