locale via config
This commit is contained in:
@@ -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}`
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user