mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
36 lines
1.3 KiB
Vue
36 lines
1.3 KiB
Vue
<script setup lang="ts">
|
|
import buildLocaleList from '#shared/buildLocaleList.ts';
|
|
import { getUrlForLocale } from '~/src/domain.ts';
|
|
|
|
const config = useConfig();
|
|
|
|
const otherLocales = computed(() => {
|
|
return buildLocaleList(config.locale).filter((locale) => locale.code !== config.locale);
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<section v-if="Object.keys($locales).length >= 3">
|
|
<h2 class="mb-3">
|
|
<Icon v="language" />
|
|
<T>links.languageVersions</T>
|
|
</h2>
|
|
<ul class="list-unstyled" style="column-count: 2;">
|
|
<li v-for="locale of otherLocales" :key="locale.code" class="mb-1">
|
|
<a :href="getUrlForLocale(locale.code)">
|
|
<Icon :v="config.style.dir === 'rtl' ? 'long-arrow-left' : 'long-arrow-right'" />
|
|
<!-- <LocaleIcon :locale="options" class="me-1"/> -->
|
|
{{ locale.name }}
|
|
<small v-if="locale.extra" class="text-muted">({{ locale.extra }})</small>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<LocaleLink locale="en" link="/new-version" class="small">
|
|
<Icon v="plus" />
|
|
<T>localise.shorter</T>
|
|
</LocaleLink>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</template>
|