mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
i18n
This commit is contained in:
@@ -32,6 +32,10 @@ const Host = "host"
|
||||
const Port = "port"
|
||||
const ExternalHost = "external_host"
|
||||
|
||||
// i18n
|
||||
const Language = "language"
|
||||
const Locale = "locale"
|
||||
|
||||
// Interface options
|
||||
const SoundOnPreview = "sound_on_preview"
|
||||
const WallShowTitle = "wall_show_title"
|
||||
@@ -97,6 +101,28 @@ func GetExcludes() []string {
|
||||
return viper.GetStringSlice(Exclude)
|
||||
}
|
||||
|
||||
func GetLanguage() string {
|
||||
ret := viper.GetString(Language)
|
||||
|
||||
// default to English
|
||||
if ret == "" {
|
||||
return "en"
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
func GetLocale() string {
|
||||
ret := viper.GetString(Locale)
|
||||
|
||||
// default to US
|
||||
if ret == "" {
|
||||
return "US"
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
func GetScrapersPath() string {
|
||||
return viper.GetString(ScrapersPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user