From c9fe6cb0b7ea984d8e4e1cb3f284935c9da7cc2b Mon Sep 17 00:00:00 2001 From: sct Date: Sun, 20 Dec 2020 01:43:54 +0900 Subject: [PATCH] feat(lang): add support for swedish language --- src/components/Layout/LanguagePicker/index.tsx | 4 ++++ src/context/LanguageContext.tsx | 3 ++- src/pages/_app.tsx | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/Layout/LanguagePicker/index.tsx b/src/components/Layout/LanguagePicker/index.tsx index c0fd1a714..071f0506b 100644 --- a/src/components/Layout/LanguagePicker/index.tsx +++ b/src/components/Layout/LanguagePicker/index.tsx @@ -61,6 +61,10 @@ const availableLanguages: AvailableLanguageObject = { code: 'sr', display: 'Serbian', }, + sv: { + code: 'sv', + display: 'Swedish', + }, }; const LanguagePicker: React.FC = () => { diff --git a/src/context/LanguageContext.tsx b/src/context/LanguageContext.tsx index 363e2a8d4..1a6778bb4 100644 --- a/src/context/LanguageContext.tsx +++ b/src/context/LanguageContext.tsx @@ -11,7 +11,8 @@ export type AvailableLocales = | 'es' | 'it' | 'pt-BR' - | 'sr'; + | 'sr' + | 'sv'; interface LanguageContextProps { locale: AvailableLocales; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 4506bebd2..974223d2c 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -37,6 +37,8 @@ const loadLocaleData = (locale: string): Promise => { return import('../i18n/locale/pt_BR.json'); case 'sr': return import('../i18n/locale/sr.json'); + case 'sv': + return import('../i18n/locale/sv.json'); default: return import('../i18n/locale/en.json'); }