Skip to content

Commit 4ca5cad

Browse files
Add Italian language support to IntlProvider
1 parent 45a8d50 commit 4ca5cad

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

frontend/src/locale/IntlProvider.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import langRu from "./lang/ru.json";
88
import langSk from "./lang/sk.json";
99
import langZh from "./lang/zh.json";
1010
import langPl from "./lang/pl.json";
11+
import langIt from "./lang/it.json";
1112

1213
// first item of each array should be the language code,
1314
// not the country code
@@ -21,6 +22,7 @@ const localeOptions = [
2122
["sk", "sk-SK"],
2223
["zh", "zh-CN"],
2324
["pl", "pl-PL"],
25+
["it", "it-IT"],
2426
];
2527

2628
const loadMessages = (locale?: string): typeof langList & typeof langEn => {
@@ -40,6 +42,8 @@ const loadMessages = (locale?: string): typeof langList & typeof langEn => {
4042
return Object.assign({}, langList, langEn, langZh);
4143
case "pl":
4244
return Object.assign({}, langList, langEn, langPl);
45+
case "it":
46+
return Object.assign({}, langList, langEn, langIt);
4347
default:
4448
return Object.assign({}, langList, langEn);
4549
}
@@ -68,6 +72,9 @@ const getFlagCodeForLocale = (locale?: string) => {
6872
case "pl":
6973
case "pl-PL":
7074
return "PL";
75+
case "it":
76+
case "it-IT":
77+
return "IT";
7178
default:
7279
return "EN";
7380
}

0 commit comments

Comments
 (0)