I18n: keep both content files inside a leaf bundle?

Hello,

I am migrating a blog with 2 languages from Wordpress to Hugo. The documentation speaks of 2 distinct ways in which I can organize my pages: by filename or by content directory.

By content directory would force me to have one folder per language, virtually separating the content files. I’d prefer having them next to each other. So I’d be more inclined to go by filename.

But I also want each post to be a leaf bundle. So I was expecting this to work:

content/
  post1/
    images/
    index.pt.md
    index.en.md
  post2/
    images/
    index.pt.md
    index.en.md

This would allow me to keep both content files next to each other (as in the filename option) but use leaf bundles to encapsulate them.

Having tried it, it doesn’t work. I fear that what I’m wanting here is a third way which is currently not possible. Or is this possible?

Thanks in advance,
Nuno

I’m pretty sure that works. You need to make sure that you have configured your languages, but the setup you outlines is pretty standard and used by many.

1 Like

Oh my! Indeed it works!

There was something wrong in the naming of my files. Since I believed this was not possible I didn’t notice that it was a file naming issue.

Hugo is indeed magical. Simple yet powerful. Actually a lot of its power seems to magically sprout from its smart way of being simple.

Thanks! And sorry for the wasted time.

Regards,
Nuno

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.