- add spanish language

This commit is contained in:
Amruth Pillai
2020-07-18 23:05:25 +05:30
parent 8e8c5f4e04
commit 13c5b92e53
4 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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 (

View File

@ -11,6 +11,10 @@ const languages = [
code: 'kn',
name: 'Kannada (ಕನ್ನಡ)',
},
{
code: 'es',
name: 'Spanish (Español)',
},
];
i18n.use(initReactI18next).init({

View File

@ -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 },
};