Add an active class to current language

I am using the code below to toggle the languages. How do I add an active class to the currently selected language?

{{ with first 2 .AllTranslations }}
         <p>Translations:
           {{ range . }}
           <a href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a>
           {{ end }}
         </p>
       {{ end }}

From a suggested solution.

{{ with first 2 .AllTranslations }}
         <p>Translations:
           {{ range . }}
           {{ if eq .Language $.Language }}
           <a href="{{ .RelPermalink }}" class="active">{{ .Language.LanguageName }}</a>
           {{ else }}
           <a href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a>
           {{end}}
           {{ end }}
         </p>
       {{ end }}

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.