mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
feat(lang): add support for Italian, Portuguese (Brazil) and Serbian
This commit is contained in:
@@ -49,6 +49,18 @@ const availableLanguages: AvailableLanguageObject = {
|
|||||||
code: 'es',
|
code: 'es',
|
||||||
display: 'Spanish',
|
display: 'Spanish',
|
||||||
},
|
},
|
||||||
|
it: {
|
||||||
|
code: 'it',
|
||||||
|
display: 'Italian',
|
||||||
|
},
|
||||||
|
'pt-BR': {
|
||||||
|
code: 'pt-BR',
|
||||||
|
display: 'Portuguese (Brazil)',
|
||||||
|
},
|
||||||
|
sr: {
|
||||||
|
code: 'sr',
|
||||||
|
display: 'Serbian',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const LanguagePicker: React.FC = () => {
|
const LanguagePicker: React.FC = () => {
|
||||||
|
@@ -8,7 +8,10 @@ export type AvailableLocales =
|
|||||||
| 'de'
|
| 'de'
|
||||||
| 'ru'
|
| 'ru'
|
||||||
| 'nl'
|
| 'nl'
|
||||||
| 'es';
|
| 'es'
|
||||||
|
| 'it'
|
||||||
|
| 'pt-BR'
|
||||||
|
| 'sr';
|
||||||
|
|
||||||
interface LanguageContextProps {
|
interface LanguageContextProps {
|
||||||
locale: AvailableLocales;
|
locale: AvailableLocales;
|
||||||
|
@@ -31,6 +31,12 @@ const loadLocaleData = (locale: string): Promise<any> => {
|
|||||||
return import('../i18n/locale/nl.json');
|
return import('../i18n/locale/nl.json');
|
||||||
case 'es':
|
case 'es':
|
||||||
return import('../i18n/locale/es.json');
|
return import('../i18n/locale/es.json');
|
||||||
|
case 'it':
|
||||||
|
return import('../i18n/locale/it.json');
|
||||||
|
case 'pt-BR':
|
||||||
|
return import('../i18n/locale/pt_BR.json');
|
||||||
|
case 'sr':
|
||||||
|
return import('../i18n/locale/sr.json');
|
||||||
default:
|
default:
|
||||||
return import('../i18n/locale/en.json');
|
return import('../i18n/locale/en.json');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user