MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / normalizeLangModule

Function normalizeLangModule

frontend/src/lang/i18n.ts:81–85  ·  view source on GitHub ↗
(langModule: any)

Source from the content-addressed store, hash-verified

79// If you want to add the language of your own country, you need to add the code here.
80const messages: Record<string, any> = {};
81const normalizeLangModule = (langModule: any) => {
82 // `import.meta.glob` returns module objects; JSON content lives on `default`.
83 // Falling back keeps compatibility if a plugin already returns plain objects.
84 return langModule?.default ?? langModule;
85};
86async function initI18n(lang: string) {
87 const { state } = useAppStateStore();
88 lang = toStandardLang(lang);

Callers 1

initI18nFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected