feat(lang): add support for swedish language

pull/407/head
sct 4 years ago
parent 3778ad829c
commit c9fe6cb0b7

@ -61,6 +61,10 @@ const availableLanguages: AvailableLanguageObject = {
code: 'sr', code: 'sr',
display: 'Serbian', display: 'Serbian',
}, },
sv: {
code: 'sv',
display: 'Swedish',
},
}; };
const LanguagePicker: React.FC = () => { const LanguagePicker: React.FC = () => {

@ -11,7 +11,8 @@ export type AvailableLocales =
| 'es' | 'es'
| 'it' | 'it'
| 'pt-BR' | 'pt-BR'
| 'sr'; | 'sr'
| 'sv';
interface LanguageContextProps { interface LanguageContextProps {
locale: AvailableLocales; locale: AvailableLocales;

@ -37,6 +37,8 @@ const loadLocaleData = (locale: string): Promise<any> => {
return import('../i18n/locale/pt_BR.json'); return import('../i18n/locale/pt_BR.json');
case 'sr': case 'sr':
return import('../i18n/locale/sr.json'); return import('../i18n/locale/sr.json');
case 'sv':
return import('../i18n/locale/sv.json');
default: default:
return import('../i18n/locale/en.json'); return import('../i18n/locale/en.json');
} }

Loading…
Cancel
Save