MCPcopy Create free account
hub / github.com/ChatGPTBox-dev/chatGPTBox / getNavigatorLanguage

Function getNavigatorLanguage

src/config/index.mjs:792–796  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

790}
791
792export function getNavigatorLanguage() {
793 const l = navigator.language.toLowerCase()
794 if (['zh-hk', 'zh-mo', 'zh-tw', 'zh-cht', 'zh-hant'].includes(l)) return 'zhHant'
795 return navigator.language.substring(0, 2)
796}
797
798export function isUsingChatgptWebModel(configOrSession) {
799 return isInApiModeGroup(chatgptWebModelKeys, configOrSession)

Callers 2

index.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected