允许获取当前默认的语言
This commit is contained in:
@@ -267,6 +267,11 @@ func GetDefaultCode() int {
|
|||||||
return l.ops.defaultCode
|
return l.ops.defaultCode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取默认语言
|
||||||
|
func GetDefaultLang() string {
|
||||||
|
return l.ops.defaultLang
|
||||||
|
}
|
||||||
|
|
||||||
func getLangFromCtx(ctx context.Context) string {
|
func getLangFromCtx(ctx context.Context) string {
|
||||||
ctxVal := ctx.Value(l.ops.ctxLangKey)
|
ctxVal := ctx.Value(l.ops.ctxLangKey)
|
||||||
lang := l.ops.defaultLang
|
lang := l.ops.defaultLang
|
||||||
|
|||||||
Reference in New Issue
Block a user