MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / app_language

Class app_language

src/command/app.cpp:152–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150};
151
152struct app_language final : public Command {
153 CMD_NAME("app/language")
154 CMD_ICON(languages_menu)
155 STR_MENU("&Language...")
156 STR_DISP("Language")
157 STR_HELP("Select Aegisub interface language")
158
159 void operator()(agi::Context *c) override {
160 // Get language
161 auto new_language = wxGetApp().locale.PickLanguage();
162 if (new_language.empty()) return;
163
164 OPT_SET("App/Language")->SetString(new_language);
165
166 // Ask to restart program
167 int result = wxMessageBox("Aegisub needs to be restarted so that the new language can be applied. Restart now?", "Restart Aegisub?", wxYES_NO | wxICON_QUESTION | wxCENTER);
168 if (result == wxYES) {
169 // Restart Aegisub
170 if (c->frame->Close()) {
171 RestartAegisub();
172 }
173 }
174 }
175};
176
177struct app_log final : public Command {
178 CMD_NAME("app/log")

Callers

nothing calls this directly

Calls 3

RestartAegisubFunction · 0.85
PickLanguageMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected