Dominik Milacher 73083ded58
Some checks failed
Build and deploy updated apps / Build & deploy (push) Failing after 1m7s
Overhaul content management
2025-10-22 19:31:38 +02:00

19 lines
570 B
Vue

<script setup lang="ts">
const config = useContentConfig()
const {preferLocale} = useContentPreference()
const {locale, path} = useContentInjected()
const locales = config.locale?.list ?? []
const candidates = computed(() => locales.filter(l => l.code !== locale.value))
</script>
<template>
<NuxtLink
v-for="candidate in candidates"
:key="candidate.code"
:to="{ path: path(undefined, {locale: candidate.code}).value, query: { freeze: 'true' }}"
@click="preferLocale(candidate.code)">
{{ candidate.code.toUpperCase() }}
</NuxtLink>
</template>