Handle Hugo translations

I’ve played again with Hugo these days, and I fell in love with the built-in multilingual system.

Hugo has such a smart approach, and I can easily combine the i18n built-in tools with my markdown files.

Their documentation is fantastic, but I did not easily find a specific element, which is excellent, and you might need it.

Instead of using the symlink approach, you are free to use a special tag in your markdown frontmatter translationKey:

translationKey = "hugo-i18n"

Use it in all translation .md files, including the parent (in the default language), and that’s it!

You only have to wrap with the following condition in your templates to display the translation links:

{{- if .IsTranslated }} 
  {{- range .Translations }}
    <a href="{{ .Permalink }}">{{ .Title }}</a>
  {{- end }}
{{- end }}


I do my best to update all my contents, but keep it mind that "Handle Hugo translations" has been published many months ago.

This content is available in other languages: