18 lines
497 B
JavaScript
18 lines
497 B
JavaScript
export default function (ctx) {
|
|
if (ctx.app.store.state.global.navigation_guard) {
|
|
ctx.app.store.commit('global/navigationGuards', false)
|
|
|
|
/////////////////////////////////// beforeEach
|
|
|
|
|
|
////////////////////////////////// afterEach
|
|
ctx.app.router.afterEach((to, from) => {
|
|
if (to.params.lang === 'fa') {
|
|
$('html').attr({lang: 'fa'})
|
|
} else if (to.params.lang === 'en') {
|
|
$('html').attr({lang: 'en'})
|
|
}
|
|
})
|
|
}
|
|
}
|