feat: Allow setting language through the command line

This commit is contained in:
WerWolv
2024-02-01 10:58:45 +01:00
parent 26eec66f89
commit 7709f4e307
7 changed files with 21 additions and 5 deletions

View File

@@ -548,7 +548,6 @@ namespace hex {
void enableSystemThemeDetection(bool enabled) {
s_systemThemeDetection = enabled;
EventSettingsChanged::post();
EventOSThemeChanged::post();
}

View File

@@ -42,13 +42,13 @@ namespace hex {
}
void loadLanguage(const std::string &language) {
s_currStrings->clear();
auto &definitions = ContentRegistry::Language::impl::getLanguageDefinitions();
if (!definitions.contains(language))
return;
s_currStrings->clear();
for (auto &definition : definitions[language])
s_currStrings->insert(definition.getEntries().begin(), definition.getEntries().end());