mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 22:58:17 +00:00
fix ui
This commit is contained in:
22
apps/edr-freight-web/backoffice/src/i18n/index.ts
Normal file
22
apps/edr-freight-web/backoffice/src/i18n/index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import i18n from "i18next";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
|
||||
/**
|
||||
* i18next singleton for the vendored IAM UI (shared/super-admin/
|
||||
* user-management), which do `import i18n from "@/i18n"` and call
|
||||
* `useTranslation()` / `t()`. Minimal init so those resolve and render keys;
|
||||
* load real translation resources here as they are migrated.
|
||||
*/
|
||||
if (!i18n.isInitialized) {
|
||||
void i18n.use(initReactI18next).init({
|
||||
resources: { en: { translation: {} } },
|
||||
lng: "en",
|
||||
fallbackLng: "en",
|
||||
interpolation: { escapeValue: false },
|
||||
returnNull: false,
|
||||
// Missing keys render as the key text itself (acceptable until resources land).
|
||||
parseMissingKeyHandler: (key) => key,
|
||||
});
|
||||
}
|
||||
|
||||
export default i18n;
|
||||
Reference in New Issue
Block a user