Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/github/docs
/ getLanguageCode
Function
getLanguageCode
middleware/detect-language.js:21–23 ·
view source on GitHub ↗
(language)
Source
from the content-addressed store, hash-verified
19
}
20
21
function
getLanguageCode(language) {
22
return
language.code ===
'cn'
&& chineseRegions.includes(language.region) ?
'zh'
: language.code
23
}
24
25
function
getUserLanguage(browserLanguages) {
26
try {
Callers
1
getUserLanguage
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected