Handle errors better

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-10-13 13:56:24 +02:00
parent 57f0b5dad1
commit 33e51a05ec
13 changed files with 214 additions and 78 deletions

13
js/src/utils/i18n.ts Normal file
View File

@@ -0,0 +1,13 @@
import Vue from 'vue';
import VueI18n from 'vue-i18n';
import messages from '@/i18n/index';
const language = (window.navigator as any).userLanguage || window.navigator.language;
Vue.use(VueI18n);
export const i18n = new VueI18n({
locale: language.split('-')[0], // set locale
messages, // set locale messages
fallbackLocale: 'en_US',
});