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