# Apache MultiViews compatible filenames (language code suffixes)?

**URL:** <https://discourse.gohugo.io/t/apache-multiviews-compatible-filenames-language-code-suffixes/4622>\
**Category:** support\
**Created:** [November 21, 2016, 3:23pm UTC](https://discourse.gohugo.io/t/apache-multiviews-compatible-filenames-language-code-suffixes/4622 "2016-11-21T15:23:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephenR](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@StephenR](https://discourse.gohugo.io/u/StephenR)\
**Post date:** [November 21, 2016, 3:23pm UTC](https://discourse.gohugo.io/t/apache-multiviews-compatible-filenames-language-code-suffixes/4622/1 "2016-11-21T15:23:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [November 21, 2016, 3:51pm UTC](https://discourse.gohugo.io/t/apache-multiviews-compatible-filenames-language-code-suffixes/4622/2 "2016-11-21T15:51:00Z")

</div>

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

No there isn’t

---

<div class="post-metadata">

**Author:** ![StephenR](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@StephenR](https://discourse.gohugo.io/u/StephenR)\
**Post date:** [November 21, 2016, 4:34pm UTC](https://discourse.gohugo.io/t/apache-multiviews-compatible-filenames-language-code-suffixes/4622/3 "2016-11-21T16:34:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [November 21, 2016, 4:42pm UTC](https://discourse.gohugo.io/t/apache-multiviews-compatible-filenames-language-code-suffixes/4622/4 "2016-11-21T16:42:57Z")

</div>

> [@StephenR](#):
>
> Any chance this feature could be added? I’d contribute a patch/pr if it would help,

You can start by creating an issue at [GitHub - gohugoio/hugo: The world’s fastest framework for building websites.](https://github.com/spf13/hugo)

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.

---

<div class="post-metadata">

**Author:** ![StephenR](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@StephenR](https://discourse.gohugo.io/u/StephenR)\
**Post date:** [November 21, 2016, 5:24pm UTC](https://discourse.gohugo.io/t/apache-multiviews-compatible-filenames-language-code-suffixes/4622/5 "2016-11-21T17:24:49Z")

</div>

Great. I’ve created [https://github.com/spf13/hugo/issues/2713](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!
