mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-04 09:22:38 +00:00
Save GUI language as string instead of wxLanguage enum
When 5.0-211 updated wxWidgets to 3.1.0, some entries in the wxLanguage enum were moved and added, changing the wxLanguage values. Because we save Dolphin's interface language to disk as a wxLanguage, the language you have set will mean something different depending on whether you have the updated wx version or not. For instance, setting the language to English with the updated version and then using an older version will make Dolphin use Dutch. Because we can't rely on the enum anymore, I'm replacing the "Language" setting with a "LanguageCode" setting that uses standard ISO 639 codes.
This commit is contained in:
parent
cef71afc27
commit
ed9007cab7
4 changed files with 26 additions and 38 deletions
|
@ -27,38 +27,14 @@
|
|||
#include "DolphinWX/X11Utils.h"
|
||||
#endif
|
||||
|
||||
static const wxLanguage language_ids[] = {
|
||||
wxLANGUAGE_DEFAULT,
|
||||
static const std::string language_ids[] = {
|
||||
"",
|
||||
|
||||
wxLANGUAGE_MALAY,
|
||||
wxLANGUAGE_CATALAN,
|
||||
wxLANGUAGE_CZECH,
|
||||
wxLANGUAGE_DANISH,
|
||||
wxLANGUAGE_GERMAN,
|
||||
wxLANGUAGE_ENGLISH,
|
||||
wxLANGUAGE_SPANISH,
|
||||
wxLANGUAGE_FRENCH,
|
||||
wxLANGUAGE_CROATIAN,
|
||||
wxLANGUAGE_ITALIAN,
|
||||
wxLANGUAGE_HUNGARIAN,
|
||||
wxLANGUAGE_DUTCH,
|
||||
wxLANGUAGE_NORWEGIAN_BOKMAL,
|
||||
wxLANGUAGE_POLISH,
|
||||
wxLANGUAGE_PORTUGUESE,
|
||||
wxLANGUAGE_PORTUGUESE_BRAZILIAN,
|
||||
wxLANGUAGE_ROMANIAN,
|
||||
wxLANGUAGE_SERBIAN,
|
||||
wxLANGUAGE_SWEDISH,
|
||||
wxLANGUAGE_TURKISH,
|
||||
"ms", "ca", "cs", "da", "de", "en", "es", "fr", "hr", "it", "hu", "nl",
|
||||
"nb", // wxWidgets won't accept "no"
|
||||
"pl", "pt", "pt_BR", "ro", "sr", "sv", "tr",
|
||||
|
||||
wxLANGUAGE_GREEK,
|
||||
wxLANGUAGE_RUSSIAN,
|
||||
wxLANGUAGE_ARABIC,
|
||||
wxLANGUAGE_FARSI,
|
||||
wxLANGUAGE_KOREAN,
|
||||
wxLANGUAGE_JAPANESE,
|
||||
wxLANGUAGE_CHINESE_SIMPLIFIED,
|
||||
wxLANGUAGE_CHINESE_TRADITIONAL,
|
||||
"el", "ru", "ar", "fa", "ko", "ja", "zh_CN", "zh_TW",
|
||||
};
|
||||
|
||||
InterfaceConfigPane::InterfaceConfigPane(wxWindow* parent, wxWindowID id) : wxPanel(parent, id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue