You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
730 B

3 years ago
2 years ago
2 years ago
  1. <template>
  2. <v-menu open-on-hover offset-y z-index="200">
  3. <template #activator="{ on }">
  4. <v-btn text v-on="on">
  5. {{ $i18n.locale }}
  6. <v-icon>{{ mdiMenuDown }}</v-icon>
  7. </v-btn>
  8. </template>
  9. <v-list v-for="locale in $i18n.locales" :key="locale.code">
  10. <nuxt-link
  11. class="v-list-item v-list-item--link"
  12. :class="$vuetify.theme.dark ? 'theme--dark' : 'theme--light'"
  13. :to="switchLocalePath(locale.code)"
  14. >
  15. {{ locale.name }}
  16. </nuxt-link>
  17. </v-list>
  18. </v-menu>
  19. </template>
  20. <script lang="ts">
  21. import Vue from 'vue'
  22. import { mdiMenuDown } from '@mdi/js'
  23. export default Vue.extend({
  24. data() {
  25. return {
  26. mdiMenuDown
  27. }
  28. }
  29. })
  30. </script>