relLangURL does not seem to work when parsing .Translations

I’ve noticed that on my site, I have a strange behaviour with relLangURL.
Say I have a page called: about.md which is as a base in German and has a translation in English about.en.md, both at the root of the content folder.

Considering the following snippet:

{{ range .Translations }}
   {{ .Permalink | relLangURL}}
{{ end }}
  1. If i go to this url http://domain.com/about/ it prints /en/about/ --> which is correct
  2. If i go to http://domain.com/en/about/ it prints /en/about/ --> IMO it should be /about/

Now, If I do the same with absLangURL, it works as I would expect it to

  1. at http://domain.com/about/ it prints http://domain.com/en/about/
  2. at http://domain.com/en/about/ it prints http://domain.com/about/

Has anyone experienced this issue?

I’m pretty confused by your exampel … do you mean that you put your translations in sections with the same name as the language?

As in content/en/about-us.en.md?

Which would explain the confusion …

Sorry about the confusion - my bad. i’ve updates the original question.

relLangURL creates URLs to the current language. The URLs you get inside the .Translations (which points to the other language) range is already ready to go and doesn’t need any relLangURL (in fact, that is just plain wrong).

relLangURL is meant as a helper to create URLs to taxonomies and the home page etc.

Thanks for the info, it makes sense.