Skip to content

Commit 2ca9b22

Browse files
authored
feat(i18n): supports multiple languages (#83)
* feat(i18n): add support for German * feat(i18n): add support for Spanish * feat(i18n): add support for Korean * feat(i18n): add support for French * feat(i18n): add support for Italiano * feat(i18n): add support for Portuguese --------- Co-authored-by: neverforward <neverforward@users.noreply.github.com>
1 parent 4e34f47 commit 2ca9b22

8 files changed

Lines changed: 8066 additions & 1 deletion

File tree

frontend/src/assets/locales/de_DE.json

Lines changed: 1339 additions & 0 deletions
Large diffs are not rendered by default.

frontend/src/assets/locales/es_ES.json

Lines changed: 1339 additions & 0 deletions
Large diffs are not rendered by default.

frontend/src/assets/locales/fr_FR.json

Lines changed: 1339 additions & 0 deletions
Large diffs are not rendered by default.

frontend/src/assets/locales/it_IT.json

Lines changed: 1339 additions & 0 deletions
Large diffs are not rendered by default.

frontend/src/assets/locales/ko_KR.json

Lines changed: 1339 additions & 0 deletions
Large diffs are not rendered by default.

frontend/src/assets/locales/pt_PT.json

Lines changed: 1339 additions & 0 deletions
Large diffs are not rendered by default.

frontend/src/i18n.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ const localeLoaders = {
1010
ru_RU: () => import("@/assets/locales/ru_RU.json"),
1111
ja_JP: () => import("@/assets/locales/ja_JP.json"),
1212
zh_HK: () => import("@/assets/locales/zh_HK.json"),
13+
de_DE: () => import("@/assets/locales/de_DE.json"),
14+
es_ES: () => import("@/assets/locales/es_ES.json"),
15+
ko_KR: () => import("@/assets/locales/ko_KR.json"),
16+
fr_FR: () => import("@/assets/locales/fr_FR.json"),
17+
it_IT: () => import("@/assets/locales/it_IT.json"),
18+
pt_PT: () => import("@/assets/locales/pt_PT.json"),
1319
} as const;
1420

1521
type SupportedLocale = keyof typeof localeLoaders;
@@ -30,6 +36,25 @@ const supportedLngs = [
3036
"zh_HK",
3137
"zh-HK",
3238
"zhhk",
39+
"ko_KR",
40+
"ko-KR",
41+
"ko",
42+
"fr_FR",
43+
"fr-FR",
44+
"fr",
45+
"de_DE",
46+
"de-DE",
47+
"de",
48+
"es_ES",
49+
"es-ES",
50+
"es",
51+
"pt_PT",
52+
"pt-PT",
53+
"pt",
54+
"it_IT",
55+
"it-IT",
56+
"it",
57+
3358
] as const;
3459

3560
const resolveLocale = (language: string): SupportedLocale => {

internal/lang/language_names.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,11 @@
33
["zh_CN", "中文(简体)"],
44
["zh_HK", "中文(香港)"],
55
["ja_JP", "日本語"],
6-
["ru_RU", "Русский язык"]
6+
["ru_RU", "Русский язык"],
7+
["ko_KR", "한국어"],
8+
["fr_FR", "Français"],
9+
["de_DE", "Deutsch"],
10+
["es_ES", "Español"],
11+
["pt_PT", "Português"],
12+
["it_IT", "Italiano"]
713
]

0 commit comments

Comments
 (0)