Fix locale handling

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-10-11 09:50:50 +02:00
parent b57c75743e
commit 259ff64641
2 changed files with 26 additions and 5 deletions

View File

@@ -24,8 +24,9 @@ const language = (window.navigator as any).userLanguage || window.navigator.lang
Vue.use(VueI18n);
const i18n = new VueI18n({
locale: language.replace('-', '_'), // set locale
locale: language.split('-')[0], // set locale
messages, // set locale messages
fallbackLocale: 'en_US',
});
// Register the router hooks with their names