MCPcopy Index your code
hub / github.com/ResearAI/AutoFigure-Edit / loadLocale

Function loadLocale

web/app.js:566–577  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

564 };
565
566 function loadLocale() {
567 try {
568 const stored = window.localStorage.getItem(LOCALE_KEY);
569 if (stored === "zh" || stored === "en") {
570 return stored;
571 }
572 } catch (_err) {
573 // Ignore storage failures.
574 }
575 const browserLang = (navigator.language || "").toLowerCase();
576 return browserLang.startsWith("zh") ? "zh" : "en";
577 }
578
579 function saveLocale(locale) {
580 try {

Callers 1

app.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected