Skip to content

Commit 40edaea

Browse files
authored
feat(i18n): add Vietnamese language support (#2670)
1 parent b1adc79 commit 40edaea

4 files changed

Lines changed: 9 additions & 1 deletion

File tree

server/api/tvdb/interfaces.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ const TMDB_TO_TVDB_MAPPING: Record<string, string> & {
185185
sv: 'swe', // Swedish
186186
tr: 'tur', // Turkish
187187
uk: 'ukr', // Ukrainian
188+
vi: 'vie', // Vietnamese
188189

189190
'es-MX': 'spa', // Spanish (Latin America) -> Spanish
190191
'nb-NO': 'nor', // Norwegian Bokmål -> Norwegian

server/types/languages.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ export type AvailableLocale =
3232
| 'tr'
3333
| 'uk'
3434
| 'zh-CN'
35-
| 'zh-TW';
35+
| 'zh-TW'
36+
| 'vi';

src/context/LanguageContext.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ export const availableLanguages: AvailableLanguageObject = {
135135
code: 'uk',
136136
display: 'українська мова',
137137
},
138+
vi: {
139+
code: 'vi',
140+
display: 'Tiếng Việt',
141+
},
138142
'zh-TW': {
139143
code: 'zh-TW',
140144
display: '繁體中文',

src/pages/_app.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ const loadLocaleData = (locale: AvailableLocale): Promise<any> => {
9191
return import('../i18n/locale/tr.json');
9292
case 'uk':
9393
return import('../i18n/locale/uk.json');
94+
case 'vi':
95+
return import('../i18n/locale/vi.json');
9496
case 'zh-CN':
9597
return import('../i18n/locale/zh_Hans.json');
9698
case 'zh-TW':

0 commit comments

Comments
 (0)