Fix several language selection issues (#994)

This commit is contained in:
Francesco Saltori 2023-10-16 13:41:06 +02:00 committed by GitHub
parent d4a2a8e8de
commit 13a50a915e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 51 deletions

View file

@ -123,7 +123,7 @@ wxPanel* GeneralSettings2::AddGeneralPage(wxNotebook* notebook)
first_row->Add(new wxStaticText(box, wxID_ANY, _("Language"), wxDefaultPosition, wxDefaultSize, 0), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
wxString language_choices[] = { _("Default"), "English" };
wxString language_choices[] = { _("Default") };
m_language = new wxChoice(box, wxID_ANY, wxDefaultPosition, wxDefaultSize, std::size(language_choices), language_choices);
m_language->SetSelection(0);
m_language->SetToolTip(_("Changes the interface language of Cemu\nAvailable languages are stored in the translation directory\nA restart will be required after changing the language"));
@ -928,8 +928,6 @@ void GeneralSettings2::StoreConfig()
auto selection = m_language->GetSelection();
if (selection == 0)
GetConfig().language = wxLANGUAGE_DEFAULT;
else if (selection == 1)
GetConfig().language = wxLANGUAGE_ENGLISH;
else
{
const auto language = m_language->GetStringSelection();