Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pkg
langx
Commits
f66e7688
Commit
f66e7688
authored
8 months ago
by
yun
Browse files
Options
Download
Email Patches
Plain Diff
允许获取当前默认的语言
parent
3a4c3e58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
langx.go
+5
-0
langx.go
with
5 additions
and
0 deletions
+5
-0
langx.go
+
5
-
0
View file @
f66e7688
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment