feat(lang): add support for Spanish language

This commit is contained in:
sct
2020-12-15 11:46:43 +00:00
parent cb8a50bd66
commit 6cd20491d2
3 changed files with 8 additions and 1 deletions

View File

@@ -45,6 +45,10 @@ const availableLanguages: AvailableLanguageObject = {
code: 'nl',
display: 'Nederlands',
},
es: {
code: 'es',
display: 'Spanish',
},
};
const LanguagePicker: React.FC = () => {

View File

@@ -7,7 +7,8 @@ export type AvailableLocales =
| 'nb-NO'
| 'de'
| 'ru'
| 'nl';
| 'nl'
| 'es';
interface LanguageContextProps {
locale: AvailableLocales;

View File

@@ -28,6 +28,8 @@ const loadLocaleData = (locale: string): Promise<any> => {
return import('../i18n/locale/ru.json');
case 'nl':
return import('../i18n/locale/nl.json');
case 'es':
return import('../i18n/locale/es.json');
default:
return import('../i18n/locale/en.json');
}