mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 16:28:31 +00:00
Update the nuxt3 version. Co-authored-by: Jonathan Adeline <jonathan@baserow.io> Co-authored-by: Bram Wiepjes <bramw@protonmail.com> Co-authored-by: Cezary <cezary@baserow.io> Co-authored-by: Tsering Paljor <tsering@baserow.io> Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io> Co-authored-by: Bram <bram2w@users.noreply.github.com>
19 lines
447 B
JavaScript
19 lines
447 B
JavaScript
/**
|
|
* This mixin forces language detection based on the browser settings instead of the
|
|
* language stored in the nuxt-i18n cookie.
|
|
*/
|
|
export default {
|
|
data() {
|
|
return {
|
|
originalLanguageBeforeDetect: null,
|
|
}
|
|
},
|
|
created() {
|
|
this.originalLanguageBeforeDetect = this.$i18n.locale
|
|
this.$i18n.locale = this.$i18n.getBrowserLocale()
|
|
},
|
|
beforeUnmount() {
|
|
this.$i18n.locale = this.originalLanguageBeforeDetect
|
|
},
|
|
}
|