mirror of
https://github.com/unti-io/go-utils.git
synced 2025-10-16 21:30:42 +08:00
v1.0.7
v1.0.7
This commit is contained in:
@@ -41,14 +41,14 @@ func (this *LangModel) Value(key any, args ...any) (result any) {
|
||||
text := cast.ToString(key)
|
||||
|
||||
// 解析语言包
|
||||
lang := cast.ToStringMap(JsonDecode(bytes.Result))
|
||||
lang := cast.ToStringMap(JsonDecode(bytes.Text))
|
||||
|
||||
// 获取语言
|
||||
result = lang[text]
|
||||
|
||||
// 如果没有找到语言,通过javascript风格获取
|
||||
if IsEmpty(result) {
|
||||
item, err := JsonGet(bytes.Result, text)
|
||||
item, err := JsonGet(bytes.Text, text)
|
||||
if err == nil {
|
||||
result = item
|
||||
}
|
||||
|
Reference in New Issue
Block a user