mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2024-12-26 16:53:59 +01:00
Add Spanish translation
This commit is contained in:
parent
b89fc74035
commit
88d2bbea92
@ -25,6 +25,10 @@ const languages = [
|
||||
{
|
||||
label: '繁体字',
|
||||
value: 'zh-TW'
|
||||
},
|
||||
{
|
||||
label: 'español',
|
||||
value: 'es-ES'
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -2,11 +2,12 @@ import en from '../../locales/en/translation.json'
|
||||
import ja from '../../locales/ja/translation.json'
|
||||
import pt_pt from '../../locales/pt_pt/translation.json'
|
||||
import zh_tw from '../../locales/zh_tw/translation.json'
|
||||
import es_es from '../../locales/es_es/translation.json'
|
||||
import { flattenMessages } from '../utils/flattenMessage'
|
||||
import { createContext, useState } from 'react'
|
||||
import { IntlProvider } from 'react-intl'
|
||||
|
||||
export type localeType = 'en' | 'ja' | 'pt-PT' | 'zh-TW'
|
||||
export type localeType = 'en' | 'ja' | 'pt-PT' | 'zh-TW' | 'es-ES'
|
||||
|
||||
type Props = {
|
||||
children: React.ReactNode
|
||||
@ -23,7 +24,8 @@ export const IntlProviderWrapper: React.FC<Props> = props => {
|
||||
{ locale: 'en', messages: flattenMessages(en) },
|
||||
{ locale: 'ja', messages: flattenMessages(ja) },
|
||||
{ locale: 'pt-PT', messages: flattenMessages(pt_pt) },
|
||||
{ locale: 'zh-TW', messages: flattenMessages(zh_tw) }
|
||||
{ locale: 'zh-TW', messages: flattenMessages(zh_tw) },
|
||||
{ locale: 'es-ES', messages: flattenMessages(es_es) }
|
||||
]
|
||||
const [lang, setLang] = useState(langs[0])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user