Multilingual only for data folder


Hi, I’m trying to add a multilingual functionality to my website for French and Spanish (on top of English). However, I have 2 issues/questions:

  • How can I have the data folder to behave the same way as content by filename. I would like to have team.en.yml, and but in the documentation, it only mentions the content folder.
  • In the content folder, I would like to show all blog posts irrelevant of the languages (at least for now, since I don’t have enough content for fr and es).

I’m basically only interested in translating the information part of the website (about us, services, team…) but not the blog part.
Thanks a lot for your help.


The data folder is language agnostic, but you can do something ala:

{{ $mydata := (index .Site.Data .Site.Language.Lang) }}

The above would need a /data/fr, i.e. a folder per language.


I’ve done it using a variation of what @bep suggest (in action here: See e.g. my carousel partial:

And the structure of the corresponding data folder:


Thanks a lot, that was really helpful. I thought I made an error in the config files while I actually made a stupid error in the layout, I was putting {{ $mydata := (index .Site.Data .Site.Language.Lang) }} above and not below the safeHTML.