github.com/easysoft/zendata@v0.0.0-20240513203326-705bd5a7fd67/ui/src/store/i18nMixin.js (about)

     1  import { mapState } from 'vuex'
     2  
     3  const i18nMixin = {
     4    computed: {
     5      ...mapState({
     6        currentLang: state => state.app.lang
     7      })
     8    },
     9    methods: {
    10      setLang (lang) {
    11        this.$store.dispatch('setLang', lang)
    12      }
    13    }
    14  }
    15  
    16  export default i18nMixin