Multilingual date inside PageGroup, can't access .Lang

I tried doing what is described here to get multilingual dates on Hugo. It worked on the single post view, but I’m having problems when using it with PageGroups.

This code displays posts organized by date (so the date does not appear multiple times if the posts are from the same day)

{{ range (.Paginate (.Data.Pages.GroupByDate "2 de January del 2006")).PageGroups  }}
<span class="post-meta">{{ .Key }}</span>
  {{ range .Pages }}
    {{ partial "post-preview.html" . }}
  {{ end }}
{{ end }}

I want to change the {{ .Key }} part to

{{ if eq .Lang "es" }}
  <span class="post-meta">{{ .Date.Day }} de {{ index $.Site.Data.meses (printf "%d" .Date.Month) }} del {{ .Date.Year }}</span>
{{ else }}
  <span class="post-meta">{{ .Date.Format "January 2, 2006" }}</span>
{{ end }}

But I’m not able to access .Lang inside PageGroup and I’m not sure how to do it…