We have a number of simple multi-language sites. There are few pages, and we like to keep the directory structure as flat as possible. Language-code appended files fit perfect for this project! (index.md, index.es.md, index.ru.md, etc.)
We add additional translations, and image translation on a per-needed basis, and rarely do βfull-site translationsβ as that gets expensive, and largely unnecessary. So if I add a Spanish version of example.svg (example.es.svg), ideally it would get renamed to example.svg during publish, but that is not happening.
structure
content/
βββ about/
β βββ a-global-example.svg
β βββ example.es.svg
β βββ example.svg
β βββ index.es.md
β βββ index.md
βββ _index.md
config.toml
defaultContentLanguage = 'en'
defaultContentLanguageInSubdir = false
index.es.md
+++
slug = "acerca"
+++
renders
public/
βββ about/
β βββ a-global-example.svg
β βββ example.svg
β βββ index.html
βββ es/
β βββ acerca/
β βββ a-global-example.svg
β βββ example.es.svg β¬
οΈ
β βββ index.html
βββ index.html
Wouldnβt it make sense in this case for Hugo to rename example.es.svg to example.svg? That seems intuitive, and kind of a missed opportunity IMHO.
Quoting Multilingual mode | Hugo
Page Bundle resources follow the same language assignment logic as content files, both by filename (
image.jpg
,image.fr.jpg
) and by directory (english/about/header.jpg
,french/about/header.jpg
).
Which is talking about language assignment inheritance, (which it accurately does do), but doesnβt rename, like perhaps it should.
Any thoughts regarding this?
I understand at this point I will likely have to either 1) Split languages into different contentDirβs
or 2) Utilize [[module.mounts]] and have translated content inherit that way.