diff --git a/renderer/components/Settings.tsx b/renderer/components/Settings.tsx index 3d8fe222..7938b6bb 100644 --- a/renderer/components/Settings.tsx +++ b/renderer/components/Settings.tsx @@ -25,6 +25,10 @@ const languages = [ { label: '繁体字', value: 'zh-TW' + }, + { + label: 'español', + value: 'es-ES' } ] diff --git a/renderer/provider/i18n.tsx b/renderer/provider/i18n.tsx index 15e1c07a..4e49c2c5 100644 --- a/renderer/provider/i18n.tsx +++ b/renderer/provider/i18n.tsx @@ -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 => { { 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])