Additional translations: Workaround for backend & date library #710

This commit is contained in:
Michael Mayer 2020-12-15 20:41:53 +01:00
parent 28880e682d
commit cd38e507f9
2 changed files with 3 additions and 3 deletions

View file

@ -80,7 +80,7 @@ Vue.prototype.$isMobile = isMobile;
Vue.use(Vuetify, {"theme": config.theme});
Vue.config.language = config.values.settings.ui.language;
Settings.defaultLocale = Vue.config.language;
Settings.defaultLocale = Vue.config.language.substring(0, 2);
// Register other VueJS plugins
Vue.use(GetTextPlugin, {

View file

@ -29,10 +29,10 @@ func SetDir(dir string) {
}
func SetLocale(loc string) {
if len(loc) != 2 {
if len(loc) < 2 {
locale = Default
} else {
loc = strings.ToLower(loc)
loc = strings.ToLower(loc[:2])
locale = Locale(loc)
}