Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(translation): add fallback for all English locale variants (#10984)

Inneice469967dee6
diff --git a/src/server/translation.ts b/src/server/translation.ts
index 67ed30c64ff..6e2c1ea4075 100644
--- a/src/server/translation.ts
+++ b/src/server/translation.ts
@@ -14,7 +14,7 @@ export const translation = async (ns: NS = 'common', hl: string) => {
try {
if (ns === 'models' || ns === 'providers') {
i18ns = await import(`@/../locales/${normalizeLocale(lng)}/${ns}.json`);
- } else if (lng === DEFAULT_LANG) {
+ } else if (lng === DEFAULT_LANG || lng.startsWith('en')) {
i18ns = await import(`@/locales/default/${ns}`);
} else {
i18ns = await import(`@/../locales/${normalizeLocale(lng)}/${ns}.json`);