diff --git a/layouts/partials/decap-cms/functions/locale.html b/layouts/partials/decap-cms/functions/locale.html index 40832ce..d8a4b24 100644 --- a/layouts/partials/decap-cms/functions/locale.html +++ b/layouts/partials/decap-cms/functions/locale.html @@ -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 }}