- if (g_config && (g_config->locale != ""))
- dictionary_manager->set_language(tinygettext::Language::from_name(g_config->locale));
+ if (g_config) {
+ if (g_config->locale != "") {
+ dictionary_manager->set_language(tinygettext::Language::from_name(g_config->locale));
+ }
+ else if(g_dictionary_manager && g_dictionary_manager->get_language()) {
+ // Language set to auto-detect?
+ dictionary_manager->set_language(g_dictionary_manager->get_language());
+ }
+ }