MCPcopy
hub / github.com/QuantumNous/new-api / GetUserLanguage

Function GetUserLanguage

model/user_cache.go:233–239  ·  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

231// GetUserLanguage returns the user's language preference from cache
232// Uses the existing GetUserCache mechanism for efficiency
233func GetUserLanguage(userId int) string {
234 userCache, err := GetUserCache(userId)
235 if err != nil {
236 return ""
237 }
238 return userCache.GetSetting().Language
239}

Callers

nothing calls this directly

Calls 2

GetUserCacheFunction · 0.85
GetSettingMethod · 0.45

Tested by

no test coverage detected