I may be missing something obvious, but I’m a little confused about multilingual images in a leaf bundle.
On the Multilingual doc page it says
Page Bundle’s resources follow the same language assignement logic as content files, be it by filename (image.jpg, image.fr.jpg) or by directory (english/about/header.jpg, french/about/header.jpg).
I have a leaf bundle with
The EN build directory contains
I thought that if I added image.es.jpg that it would replace image.jpg in the ES build. Instead, the ES directory contains
If I have a leaf bundle file named image2.es.jpg (without a file named image2.jpg), then image2.es.jpg ends up in both builds.
Is there a way to have bundle images ending in .es.jpg only used in the ES build?
And is there a way to have them renamed without the .es, so that .md files can simply refer to “image.jpg”, no matter what the language?
The doc says:
If, across the linked bundles, two or more files share the same basenname, only one will be included and chosen as follows:
- File from current language Bundle, if present.
- First file found across bundles by order of language Weight.
I’m trying to figure out if what you describe follows that. Is your site available somewhere? Or could you make a minimal example repo we can clone?
The leaf bundle is in content/spread-strategy/printed-material/
Build the site, then compare
EN is as expected, with zine.jpg
ES may be as expected, with zine.es.jpg. I expected this file would be renamed to zine.jpg, but perhaps that’s not how it’s supposed to work.
RU really confuses me. Even though English has the lowest “weight” value, RU has zine.es.jpg instead of zine.jpg. This seems to contradict “First file found across bundles by order of language Weight.”