Commit f66e7688 authored by yun's avatar yun
Browse files

允许获取当前默认的语言

parent 3a4c3e58
Showing with 5 additions and 0 deletions
+5 -0
......@@ -267,6 +267,11 @@ func GetDefaultCode() int {
return l.ops.defaultCode
}
// 获取默认语言
func GetDefaultLang() string {
return l.ops.defaultLang
}
func getLangFromCtx(ctx context.Context) string {
ctxVal := ctx.Value(l.ops.ctxLangKey)
lang := l.ops.defaultLang
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment