We have a multilingual site (english, french), with the following content organisation:
content |--- section1 | |--- _index.fr.md | |--- _index.en.md | |--- post1 | | |--- index.fr.md | | |--- index.en.md | |--- post2 | | |--- index.fr.md | | |--- index.en.md |--- section2 | |--- _index.fr.md | |--- _index.en.md | |--- section3 | | |--- _index.fr.md | | |--- _index.en.md | | |--- post3 | | | |--- index.fr.md | | | |--- index.en.md | | |--- post4 | | | |--- index.fr.md | | | |--- index.en.md
The idea being to easily find content with a lacking multilingual version.
The section names (section1, section2) are actually french names. Going to the english version, we have french names in the url and navigation bar. trying to add “slug” names in the _index.xx.md files does not help. Playing with “url” in these files brings a mess for subsections (basically, we have to keep track of the parent sectiosn by hand).
[Languages.en.permalinks] section1 = "/section1_english_name/sections[1:]/:title"
fixed it for section1.
However, I can’t seem to get it working for subsections…
I believe the front-matter info in _index.en.md files should naturally be used by hugo to define section names (or another variable) so eveything, including urls get nicely and properly translated without hand keeping.
Thanks for your input/feedback/help…