MCPcopy Create free account
hub / github.com/QuantumNous/new-api / GetUserLanguage

Function GetUserLanguage

model/user_cache.go:287–293  ·  view source on GitHub ↗

GetUserLanguage returns the user's language preference from cache Uses the existing GetUserCache mechanism for efficiency

(userId int)

Source from the content-addressed store, hash-verified

285// GetUserLanguage returns the user's language preference from cache
286// Uses the existing GetUserCache mechanism for efficiency
287func GetUserLanguage(userId int) string {
288 userCache, err := GetUserCache(userId)
289 if err != nil {
290 return ""
291 }
292 return userCache.GetSetting().Language
293}

Callers

nothing calls this directly

Calls 2

GetUserCacheFunction · 0.85
GetSettingMethod · 0.45

Tested by

no test coverage detected