diff --git a/frontend/src/app/dashboard/glossaries/[id]/page.tsx b/frontend/src/app/dashboard/glossaries/[id]/page.tsx index 3a1ef55..322a41c 100644 --- a/frontend/src/app/dashboard/glossaries/[id]/page.tsx +++ b/frontend/src/app/dashboard/glossaries/[id]/page.tsx @@ -41,9 +41,11 @@ function getDisplaySource( glossarySourceLang: string ): string { if (!lang || lang === 'multi') return ''; - if (lang === glossarySourceLang) return term.source; + const normalizedLang = lang.toLowerCase(); + const normalizedSourceLang = glossarySourceLang.toLowerCase(); + if (normalizedLang === normalizedSourceLang) return term.source; const translations = term.translations || {}; - return translations[lang] || ''; + return translations[normalizedLang] || ''; } /** Target term in the chosen language. @@ -54,9 +56,11 @@ function getDisplayTarget( glossaryTargetLang: string ): string { if (!lang) return ''; - if (lang === 'multi' || lang === glossaryTargetLang) return term.target; + const normalizedLang = lang.toLowerCase(); + const normalizedTargetLang = glossaryTargetLang.toLowerCase(); + if (normalizedLang === 'multi' || normalizedLang === normalizedTargetLang) return term.target; const translations = term.translations || {}; - return translations[lang] || ''; + return translations[normalizedLang] || ''; } export default function GlossaryDetailPage() {