13 lines
462 B
Vue
13 lines
462 B
Vue
<script setup lang="ts">
|
|
const { locale, localeCodes, matrixPath } = useContent()
|
|
const { preferLocale } = useContentPreference()
|
|
|
|
const candidates = computed(() => localeCodes.filter(l => l !== locale.value))
|
|
</script>
|
|
|
|
<template>
|
|
<NuxtLink v-for="candidate in candidates" :key="candidate" :to="{ path: matrixPath({locale: candidate}), query: { freeze: 'true' } }" @click="preferLocale(candidate)">
|
|
{{ candidate.toUpperCase() }}
|
|
</NuxtLink>
|
|
</template>
|