MCPcopy Index your code
hub / github.com/graphif/project-graph / loadLanguageFiles

Function loadLanguageFiles

app/src/main.tsx:110–127  ·  view source on GitHub ↗

加载语言文件

()

Source from the content-addressed store, hash-verified

108
109/** 加载语言文件 */
110async function loadLanguageFiles() {
111 i18next.use(initReactI18next).init({
112 lng: Settings.language,
113 // debug会影响性能,并且没什么用,所以关掉
114 // debug: import.meta.env.DEV,
115 debug: false,
116 defaultNS: "",
117 fallbackLng: false,
118 saveMissing: false,
119 resources: {
120 en: await import("./locales/en.yml").then((m) => m.default),
121 zh_CN: await import("./locales/zh_CN.yml").then((m) => m.default),
122 zh_TW: await import("./locales/zh_TW.yml").then((m) => m.default),
123 zh_TWC: await import("./locales/zh_TWC.yml").then((m) => m.default),
124 id: await import("./locales/id.yml").then((m) => m.default),
125 },
126 });
127}
128
129/** 渲染应用 */
130async function renderApp(cli: boolean = false) {

Callers 1

main.tsxFile · 0.85

Calls 1

initMethod · 0.45

Tested by

no test coverage detected