MCPcopy Index your code
hub / github.com/github/docs / translationExists

Function translationExists

middleware/detect-language.js:13–19  ·  view source on GitHub ↗
(language)

Source from the content-addressed store, hash-verified

11]
12
13function translationExists(language) {
14 if (language.code === 'zh') {
15 return chineseRegions.includes(language.region)
16 }
17 // 92BD1212-61B8-4E7A: Remove ` && !languages[language.code].wip` for the public ship of ko, fr, de, ru
18 return languageKeys.includes(language.code) && !languages[language.code].wip
19}
20
21function getLanguageCode(language) {
22 return language.code === 'cn' && chineseRegions.includes(language.region) ? 'zh' : language.code

Callers 1

getUserLanguageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected