Apache MultiViews compatible filenames (language code suffixes)?

Howdy,

I’m just getting started with Hugo, and while I was glad to see multi-language support, it seems Hugo can only support this in a /public/<languageCode>/filename(.html|/index.html) filesystem layout.

Is there some hidden feature (or even a plugin I could use) to have hugo use a /public/filename(/index)?.<languageCode>.html filesystem layout?

It occurred to me that I could just post-process rename the files to my desired mapping, but I would also need to post-process the content to remove all // segments in links (being careful not to affect links in a “translations” section to allow overriding the browser’s header).

But honestly that seems like the wrong way to go about things. I’d like to believe there is a better way.

No there isn’t

Thanks for the quick response.
Any chance this feature could be added? I’d contribute a patch/pr if it would help, but my experience with Go is 0 so I don’t even know how much effort this would involve or how many places in the code would have to be touched to make it work.

You can start by creating an issue at GitHub - gohugoio/hugo: The world’s fastest framework for building websites.

If this is how Apache does content negotiation for language, then it seems to be of value. But it’s not at the top of my list of things to do.

Great. I’ve created https://github.com/spf13/hugo/issues/2713. I’m happy to discuss details and/or what’s required in the web server config to make this work.

Thanks again!