Skip to content

Commit

Permalink
fix: correct the UI locale for Chinese (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang authored Jan 15, 2024
1 parent 272c9a2 commit 7a8363a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions layouts/partials/decap-cms/functions/locale.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
{{- $map := dict
"zh-cn" "zh_Hans"
"zh-hans" "zh_Hans"
"zh-hant" "zh_Hant"
"zh-hk" "zh_Hant"
"zh-tw" "zh_Hant"
}}
{{- $locale := site.Language.LanguageCode }}
{{- with index $map $locale }}
{{- $locale = . }}
{{- end }}
{{- return $locale }}

0 comments on commit 7a8363a

Please sign in to comment.