fix blog translations

This commit is contained in:
2020-12-17 18:44:07 +01:00
parent 1c4539b199
commit c69155abe3
5 changed files with 13 additions and 11 deletions

View File

@@ -120,8 +120,10 @@ export default {
this.scrollPosition = window.scrollY
},
async changeLanguage(lang) {
await this.$router.push('/')
this.$i18n.setLocale(lang)
await this.$i18n.setLocale(lang)
if (this.$router.currentRoute.fullPath.includes('blog')) {
await this.$nuxt.refresh()
}
},
},
mounted() {