Multilingual output of same front matter

Hi all!

Assuming my folder structure looks like this:

calendar/
    event1.md
    event2.md

The files contain only front matter.

Is it possible to generate the content in multiple languages? The headings, such as place, time , speaker would be easily changed using i18n. The front matter content is identical for all languages.

What I would like to avoid is

calendar/
    event1.md
    event1.de.md
    event2.md
    event2.de.md

with de files containing exactly the same content.

Thank you very much.

Currently no. But this relates a little to the “content from data” discussion we have from time to time. That will eventually happen and it would be natural to think many languages when we get to that – e.g. having /data/calendar/event1.yaml etc. which could be used to publish pages per language.

Thank you, bep! That would be an excellent solution. (I was wondering anyway whether it makes sense to use the data folder for an event calendar.)

I’ve read many post related about it.

But I’m not clear how to solve it with the current release of hugo. What should be the best solution?

data/carousel/en/1.yaml
data/carousel/en/2.yaml
data/carousel/es/1.yaml
data/carousel/es/2.yaml

or

data/carousel/1.en.yaml
data/carousel/2.en.yaml
data/carousel/1.es.yaml
data/carousel/2.es.yaml

Like content does. Feel more natural to keep the same file structure as content does, anyway data is a sort of content.