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.
content/ ├── about/ │ ├── a-global-example.svg │ ├── example.es.svg │ ├── example.svg │ ├── index.es.md │ └── index.md └── _index.md
defaultContentLanguage = 'en' defaultContentLanguageInSubdir = false
+++ slug = "acerca" +++
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.fr.jpg) and by directory (
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.