2021-07-02 05:01:29 +00:00
|
|
|
<template>
|
|
|
|
|
<span>
|
|
|
|
|
<tippy
|
|
|
|
|
ref="language"
|
2021-07-08 07:30:41 +00:00
|
|
|
interactive
|
2021-07-03 13:14:58 +00:00
|
|
|
tabindex="-1"
|
2021-07-02 05:01:29 +00:00
|
|
|
trigger="click"
|
|
|
|
|
theme="popover"
|
|
|
|
|
arrow
|
|
|
|
|
:animate-fill="false"
|
|
|
|
|
>
|
|
|
|
|
<template #trigger>
|
2021-07-05 16:52:15 +00:00
|
|
|
<TabPrimary
|
2021-07-03 13:14:58 +00:00
|
|
|
v-tippy="{ theme: 'tooltip' }"
|
|
|
|
|
:title="$t('choose_language')"
|
2021-07-04 16:59:37 +00:00
|
|
|
:label="`${
|
|
|
|
|
$i18n.locales.find(({ code }) => code == $i18n.locale).country
|
|
|
|
|
} ${$i18n.locales.find(({ code }) => code == $i18n.locale).name}`"
|
|
|
|
|
/>
|
2021-07-02 05:01:29 +00:00
|
|
|
</template>
|
2021-07-04 16:59:37 +00:00
|
|
|
<SmartItem
|
2021-07-02 05:01:29 +00:00
|
|
|
v-for="locale in $i18n.locales.filter(
|
|
|
|
|
({ code }) => code !== $i18n.locale
|
|
|
|
|
)"
|
|
|
|
|
:key="locale.code"
|
2021-07-04 16:59:37 +00:00
|
|
|
:to="switchLocalePath(locale.code).toString()"
|
2021-07-05 05:08:03 +00:00
|
|
|
:label="`${locale.country} ${locale.name}`"
|
2021-07-05 16:52:15 +00:00
|
|
|
@click.native="$refs.language.tippy().hide()"
|
2021-07-04 16:59:37 +00:00
|
|
|
/>
|
2021-07-02 05:01:29 +00:00
|
|
|
</tippy>
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|