MCPcopy Create free account
hub / github.com/VirtualHotBar/NetMount / getLangCode

Function getLangCode

src/controller/language/localized.ts:19–28  ·  view source on GitHub ↗
(lang: string)

Source from the content-addressed store, hash-verified

17}
18
19function getLangCode(lang: string): string {
20 for (const value of roConfig.options.setting.language.select) {
21 if (lang === value.value) {
22 return value.langCode
23 }
24 }
25 const select =
26 roConfig.options.setting.language.select[roConfig.options.setting.language.defIndex]
27 return select?.langCode ?? 'en'
28}
29
30export { setLocalized, getLangCode }

Callers 2

AppFunction · 0.90
setLocalizedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected