MCPcopy
hub / github.com/TanShilongMario/PromptFill / getSystemLanguage

Function getSystemLanguage

src/utils/helpers.js:305–309  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303
304// 获取系统语言 (非中文环境默认返回 en)
305export const getSystemLanguage = () => {
306 if (typeof window === 'undefined') return 'cn';
307 const lang = (navigator.language || navigator.languages?.[0] || 'zh-CN').toLowerCase();
308 return lang.startsWith('zh') ? 'cn' : 'en';
309};
310
311// 等待图片加载完成,避免导出时空白
312export const waitForImageLoad = (img, timeout = 6000) => {

Callers 2

PrivacyPageFunction · 0.90
RootProviderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected