Use browser locale as default lang
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2023-03-02 08:29:38 +01:00
parent 3b7cf5f3ba
commit 0bd205a75c
3 changed files with 2 additions and 4 deletions

View File

@ -3,7 +3,7 @@ import { createI18n } from 'vue-i18n';
import messages from 'src/i18n'; import messages from 'src/i18n';
const i18n = createI18n({ const i18n = createI18n({
locale: 'en', locale: navigator.language || navigator.userLanguage,
fallbackLocale: 'en', fallbackLocale: 'en',
globalInjection: true, globalInjection: true,
messages, messages,

View File

@ -15,8 +15,6 @@ const user = state.getUser();
const token = session.getToken(); const token = session.getToken();
const appName = 'Lilium'; const appName = 'Lilium';
defineEmits(['onToggleRightDrawer']);
onMounted(() => stateStore.setMounted()); onMounted(() => stateStore.setMounted());
</script> </script>

View File

@ -10,7 +10,7 @@ const stateStore = useStateStore();
<template> <template>
<q-layout view="hHh LpR fFf"> <q-layout view="hHh LpR fFf">
<Navbar @on-toggle-right-drawer="stateStore.toggleRightDrawer()" /> <Navbar />
<router-view></router-view> <router-view></router-view>
<q-drawer <q-drawer
v-model="stateStore.rightDrawer" v-model="stateStore.rightDrawer"