[Vuejs]-Vuetify Switcher I18N translation

0👍

Hi you can do it using a watcher:

<template>
  <v-switch v-model="switch1" label="Switch 1"></v-switch>
</template>

<script>
export default Vue.extend({
  data: () => ({
    switch1: false;
  }),
  watch: {
    switch1(newValue, oldValue) {
      this.$i18n.setLocale(newValue ? 'fr' : 'en');
    },
  },
});
</script>

Leave a comment