Two more or less related versions of my site in two languages

Hello,

I’m confuse about how I should configure Hugo for my use-case concerning a multilingual website. I’ve read the documentation, and I’ve tried some stuff, but still. Here is my case:

I want two versions of the website, one under “/en/” (english), and the other under “/fr/” (french). But these two versions aren’t a direct translation of each other. The english version has some content, and the french version has some other content that do not match the english version. They don’t even have the same menu items.

Now I want the “/index.html” file (content/_index.md) to simply be a page that displays two links: one for “content/en/_index.md”, and the other for “content/fr/_index.md”.

So, could you give me some clues about how I should manage that? My theme has a main menu in the header, how can I have two versions of this menu? How can have two footers? Also, the taxonomies from the english and french versions shouldn’t be aware of each other. Basically, the only thing that the english and french sub-sites share, is the theme (the design).

I hope my this makes sense, thanks for your support!

Multilinugal has to aspects:

  • localization of common elements (usually menus, messages…, dates, numbers)
  • translation of content

But there’s no automatism that automagically links these pages unless you call the respective methods and functions (eg. i8n or .Translations)

so, if you follow the multilingual docs without implementing the translation part you have two languages.

  • menus

    menus are defined per language, so that is same as above.

    each language can have it’s own templates to add language specific header and or footer, Lookup rules#languages or just query languages in

  • taxonomies/terms

    not really sure about that, but if you have distinct terms for each language or filter by values that should not be a problem.

  • global index

    with en/index and fr/index and rather unrelated content I would go with two folders and set defaultLanguageInSubdir to true.

    the topic has been recently handled with Root page for a multilingual site

  • if you already have a theme you will have to check out which parts are language independent and which not. Either implement something like if language is EN then, else or split that in two layouts … depends


you could also just create two content toplevel sections for en and fr and place the files in each.layout lookup controlled by section (llokup-order), without defining a language at all… but this will

  • disable localization fe for common messages or dates
  • result in no (standard) way to link to a translation just in case