{{- /* Selection of available languages. Dynamically links to corresponding page/post if a translated version exists, otherwise to homepage of that language as fallback. Note: `$activeLang` and `$allTranslationsForPage` are technically unnecessary variables, their values could be called with `$.Lang` and `$.Translations` respectively. These variables - together with the explicit naming of `.` context variables in other cases - were chosen for better readability and understandability of the code. */ -}} {{- if gt (len site.Languages) 1 }} {{- $activeLang := .Lang }} {{- $allTranslationsForPage := .Translations }}