Customize multilang url - putting the lang code last

Hi, I tried to research the forums docs and blogs, but could not find anything about this.
Is it possible to configure Hugo in multilang so that the lang code ends up last in the url.
i.e instead of the default
/langcode/page/

it would be
/page/langcode/

Translation by filename

Considering the following example:

  1. /content/about.en.md
  2. /content/about.fr.md

please check this will help Multilingual mode | Hugo

Do you have an example of a site which is currently doing this?

/ in url is similar to folders on your pc each / basically is a new folder in directory so if you make your language a folder inside your page then it is not the best or easiest solution to manage content for a language.

looking forward to bit more details on use case maybe you know something new.

thanks

No, it is not.

Oki, then I understood it correct. IMHO it would it make easier to create nicer urls for hugo.

Example:
/learn/more/gr/
would certainly look nicer than currentl
/learn/gr/more
But it is what it is.

Are there any ongoing work/plans for more configurable URL-handling, or should I add a feature request issue?

The chances of this being accepted are essentially… zero.

Ok, because of ?

Better try and fail, then to not try at all. Configure multilang urls to postifx the langcode instead of prefix it · Issue #9663 · gohugoio/hugo · GitHub :slight_smile:

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