Skip prompting the user for a language on first start if we have a translation for their OS UI language

This commit is contained in:
Thomas Goyne 2014-05-06 10:29:53 -07:00
parent 47b8627ad3
commit 50d0744e9c
1 changed files with 6 additions and 0 deletions

View File

@ -71,6 +71,12 @@ void AegisubLocale::Init(wxString const& language) {
}
wxString AegisubLocale::PickLanguage() {
if (!active_language) {
wxString os_ui_language = GetTranslations()->GetBestTranslation(AEGISUB_CATALOG);
if (!os_ui_language.empty())
return os_ui_language;
}
wxArrayString langs = GetTranslations()->GetAvailableTranslations(AEGISUB_CATALOG);
langs.insert(langs.begin(), "en_US");