feat(cms): implement multi-language support across frontend and admin UI

This commit is contained in:
Your Name committed 2026-06-14 09:00:57 -04:00
1 parent 730e2a7b48
commit eac45dd4a7
62 files changed
+1377 -5116

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
export function getLocalizedField(field: any, currentLang: string): string {
if (field === null || field === undefined) {
return '';
}
if (typeof field === 'string') {
return field;
}
if (typeof field === 'object') {
if (field[currentLang] !== undefined) {
return field[currentLang];
}
if (field['en'] !== undefined) {
return field['en'];
}
const keys = Object.keys(field);
if (keys.length > 0) {
return field[keys[0]];
}
}
return String(field);
}