diff --git a/README.md b/README.md index 02ca4f5b..0ccc2104 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ For those of you familiar with the Crowdin Platform, you could do that too and j - English - Kannada (ಕನ್ನಡ) +- Spanish (Español) (by [@jrgonzalezrios](https://github.com/jrgonzalezrios)) ### Building from Source diff --git a/src/contexts/SettingsContext.js b/src/contexts/SettingsContext.js index 98aa529a..e17e6b1d 100644 --- a/src/contexts/SettingsContext.js +++ b/src/contexts/SettingsContext.js @@ -1,5 +1,4 @@ import i18next from 'i18next'; -import moment from 'moment'; import React, { createContext, memo, useEffect, useState } from 'react'; import themeConfig from '../data/themeConfig'; @@ -35,7 +34,6 @@ const SettingsProvider = ({ children }) => { useEffect(() => { localStorage.setItem('language', language); i18next.changeLanguage(language); - moment.locale(language); }, [language]); return ( diff --git a/src/i18n/index.js b/src/i18n/index.js index b44c1106..dbb8dab9 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -11,6 +11,10 @@ const languages = [ code: 'kn', name: 'Kannada (ಕನ್ನಡ)', }, + { + code: 'es', + name: 'Spanish (Español)', + }, ]; i18n.use(initReactI18next).init({ diff --git a/src/i18n/locales/index.js b/src/i18n/locales/index.js index 16282101..30e800ad 100644 --- a/src/i18n/locales/index.js +++ b/src/i18n/locales/index.js @@ -1,7 +1,9 @@ import en from './en.json'; import kn from './kn.json'; +import es from './es.json'; export default { en: { translation: en }, kn: { translation: kn }, + es: { translation: es }, };