Skip to content

Commit

Permalink
fix: use current site language as the default i18n.default_locale (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Jan 24, 2024
1 parent 5ff085d commit a3e0c06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/decap-cms/functions/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
{{- $i18n = merge $i18n (dict "locales" $locales) -}}
{{- end -}}
{{- if not .default_locale -}}
{{- $i18n = merge $i18n (dict "default_locale" (index $locales 0)) -}}
{{- $i18n = merge $i18n (dict "default_locale" site.Language.LanguageCode) -}}
{{- end -}}
{{- $config.Set "i18n" $i18n -}}
{{- end -}}
Expand Down

0 comments on commit a3e0c06

Please sign in to comment.