elk/components/settings/SettingsLanguage.vue

17 lines
474 B
Vue
Raw Normal View History

<script setup lang="ts">
2024-02-24 19:46:14 +03:00
import type { LocaleObject } from '@nuxtjs/i18n'
import type { ComputedRef } from 'vue'
const userSettings = useUserSettings()
const { locales } = useI18n() as { locales: ComputedRef<LocaleObject[]> }
</script>
<template>
<select v-model="userSettings.language">
<option v-for="item in locales" :key="item.code" :value="item.code" :selected="userSettings.language === item.code">
{{ item.name }}
</option>
</select>
</template>