2024-09-07 10:38:18 +03:00
|
|
|
<script setup lang="ts">
|
2024-02-24 19:46:14 +03:00
|
|
|
import type { LocaleObject } from '@nuxtjs/i18n'
|
2024-09-30 11:11:56 +03:00
|
|
|
import type { ComputedRef } from 'vue'
|
2022-12-28 02:03:50 +03:00
|
|
|
|
2023-01-12 20:52:52 +03:00
|
|
|
const userSettings = useUserSettings()
|
|
|
|
|
2022-12-28 02:03:50 +03:00
|
|
|
const { locales } = useI18n() as { locales: ComputedRef<LocaleObject[]> }
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-01-12 20:52:52 +03:00
|
|
|
<select v-model="userSettings.language">
|
|
|
|
<option v-for="item in locales" :key="item.code" :value="item.code" :selected="userSettings.language === item.code">
|
2022-12-28 02:03:50 +03:00
|
|
|
{{ item.name }}
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</template>
|