locale via config

This commit is contained in:
lesion
2019-06-10 01:25:05 +02:00
parent b01f4ef04d
commit 50de4e8ebb
16 changed files with 52 additions and 55 deletions

View File

@@ -8,18 +8,10 @@ export default ({ app, store }) => {
// Set i18n instance on app
// This way we can use it in middleware and pages asyncData/fetch
app.i18n = new VueI18n({
locale: store.state.locale,
fallbackLocale: 'it',
locale: process.env.locale,
fallbackLocale: process.env.locale,
messages: {
it
}
})
// app.i18n.path = (link) => {
// if (app.i18n.locale === app.i18n.fallbackLocale) {
// return `/${link}`
// }
// return `/${app.i18n.locale}/${link}`
// }
}