MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / getStoredLanguage

Function getStoredLanguage

frontend/src/services/i18n.ts:326–334  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

324const dictionaries: Record<Language, Record<string, string>> = { en, zh }
325
326export function getStoredLanguage(): Language {
327 try {
328 const value = localStorage.getItem(STORAGE_KEY)
329 if (value === 'en' || value === 'zh') return value
330 } catch {
331 // localStorage unavailable (SSR/tests) — fall through to default.
332 }
333 return 'en'
334}
335
336function persistLanguage(language: Language) {
337 if (typeof document !== 'undefined') {

Callers 1

i18n.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected