From a30a4c48689bbbec5edfc159531e81c70e4d50af Mon Sep 17 00:00:00 2001 From: memcos <61847929+memcos@users.noreply.github.com> Date: Sat, 2 May 2026 13:51:58 +0300 Subject: [PATCH] Update TranslationContext.tsx tr language support added --- client/src/i18n/TranslationContext.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/i18n/TranslationContext.tsx b/client/src/i18n/TranslationContext.tsx index cb2a5175..6ebe7f73 100644 --- a/client/src/i18n/TranslationContext.tsx +++ b/client/src/i18n/TranslationContext.tsx @@ -15,6 +15,7 @@ import ar from './translations/ar' import br from './translations/br' import cs from './translations/cs' import pl from './translations/pl' +import tr from './translations/tr' import { SUPPORTED_LANGUAGES, SupportedLanguageCode } from './supportedLanguages' export { SUPPORTED_LANGUAGES } @@ -23,7 +24,7 @@ type TranslationStrings = Record = { - de, en, es, fr, hu, it, ru, zh, 'zh-TW': zhTw, nl, id, ar, br, cs, pl, + de, en, es, fr, hu, it, ru, zh, 'zh-TW': zhTw, nl, id, ar, br, cs, pl, tr, } // Derived from SUPPORTED_LANGUAGES — add new languages there, not here. @@ -38,7 +39,7 @@ export function getLocaleForLanguage(language: string): string { export function getIntlLanguage(language: string): string { if (language === 'br') return 'pt-BR' - return ['de', 'es', 'fr', 'hu', 'it', 'ru', 'zh', 'zh-TW', 'nl', 'ar', 'cs', 'pl', 'id'].includes(language) ? language : 'en' + return ['de', 'es', 'fr', 'hu', 'it', 'ru', 'zh', 'zh-TW', 'nl', 'ar', 'cs', 'pl', 'id', 'tr'].includes(language) ? language : 'en' } export function isRtlLanguage(language: string): boolean {