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.

41 lines
767 B

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