kopia lustrzana https://github.com/elk-zone/elk
ui(i18n): translate select language (#204)
rodzic
4e73bba5cd
commit
f72dd01ce7
|
@ -1,7 +1,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { STORAGE_KEY_LANG } from '~/constants'
|
import { STORAGE_KEY_LANG } from '~/constants'
|
||||||
|
|
||||||
const { locale } = useI18n()
|
const { locale, t } = useI18n()
|
||||||
useLocalStorage(STORAGE_KEY_LANG, locale)
|
useLocalStorage(STORAGE_KEY_LANG, locale)
|
||||||
|
|
||||||
// TODO: read from $i18n https://i18n.nuxtjs.org/lang-switcher
|
// TODO: read from $i18n https://i18n.nuxtjs.org/lang-switcher
|
||||||
|
@ -18,7 +18,7 @@ const languageList = [
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CommonTooltip placement="bottom" content="Select Language">
|
<CommonTooltip placement="bottom" :content="t('selectLanguage')">
|
||||||
<CommonDropdown>
|
<CommonDropdown>
|
||||||
<button flex>
|
<button flex>
|
||||||
<div i-ri:earth-line text-lg />
|
<div i-ri:earth-line text-lg />
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"selectLanguage": "Select Language",
|
||||||
"nav_side": {
|
"nav_side": {
|
||||||
"home": "Home",
|
"home": "Home",
|
||||||
"notifications": "Notifications",
|
"notifications": "Notifications",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"selectLanguage": "选择语言",
|
||||||
"nav_side": {
|
"nav_side": {
|
||||||
"bookmarks": "书签",
|
"bookmarks": "书签",
|
||||||
"conversations": "私信",
|
"conversations": "私信",
|
||||||
|
|
Ładowanie…
Reference in New Issue