diff --git a/modules/charset/ambiguous.go b/modules/charset/ambiguous.go index 9dab3b0951..ef5e7650a6 100644 --- a/modules/charset/ambiguous.go +++ b/modules/charset/ambiguous.go @@ -29,6 +29,12 @@ func AmbiguousTablesForLocale(locale translation.Locale) []*AmbiguousTable { key = key[:idx] } } + if table == nil && (locale.Language() == "zh-CN" || locale.Language() == "zh_CN") { + table = AmbiguousCharacters["zh-hans"] + } + if table == nil && strings.HasPrefix(locale.Language(), "zh") { + table = AmbiguousCharacters["zh-hant"] + } if table == nil { table = AmbiguousCharacters["_default"] }