separate options for form and admin language

This commit is contained in:
Harvey Tindall
2021-01-15 14:43:32 +00:00
parent 422f13202b
commit a3351f4da8
4 changed files with 54 additions and 20 deletions
+9 -2
View File
@@ -84,8 +84,15 @@ func (app *appContext) loadConfig() error {
substituteStrings = app.config.Section("jellyfin").Key("substitute_jellyfin_strings").MustString("")
app.storage.lang.chosenFormLang = app.config.Section("ui").Key("language").MustString("en-us")
app.storage.lang.chosenFormLang = app.config.Section("ui").Key("language").MustString("en-us")
oldFormLang := app.config.Section("ui").Key("language").MustString("")
if oldFormLang != "" {
app.storage.lang.chosenFormLang = oldFormLang
}
newFormLang := app.config.Section("ui").Key("language-form").MustString("")
if newFormLang != "" {
app.storage.lang.chosenFormLang = newFormLang
}
app.storage.lang.chosenAdminLang = app.config.Section("ui").Key("language-admin").MustString("en-us")
return nil
}