feat: lang
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { setCookie } from '@/lib/cookies';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const i18n = useI18n();
|
||||
|
||||
function onSetLang(lang: string) {
|
||||
i18n.locale.value = lang;
|
||||
setCookie('lang', lang);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a href="#" @click.prevent="onSetLang('fr')">🇫🇷</a> / <a href="#" @click.prevent="onSetLang('en')">🇺🇸</a>
|
||||
</template>
|
||||
Reference in New Issue
Block a user