0
0
Fork 0

Use browser locale as default lang

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';
const i18n = createI18n({
locale: 'en',
locale: navigator.language || navigator.userLanguage,
fallbackLocale: 'en',
globalInjection: true,
messages,

View File

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

View File

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