1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-14 12:59:59 +00:00
elk/components/settings/SettingsLanguage.vue

17 lines
467 B
Vue
Raw Normal View History

<script lang="ts" setup>
import type { ComputedRef } from 'vue'
import type { LocaleObject } from '#i18n'
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>