Best way to translate HTML files

Hi, everybody

I’ve been trying to help this project with a translation process and I’d like your help.

I’m new to Jekyll and this method seems the most simple to me but I’m having trouble with translating the HTML files. My goal is to get the lines with text from file “index.html” and put them all into “en.yml”. Something like:

index_1: Welcome
index_2: …

And then have a /i18n/pt/pt.yml where I would keep an equivalent of “en.yml” but translated to Portuguese (and other languages). Then the goal would be to have inside /i18n/pt/ a “index_pt.html” where I would reference the strings in “pt.yml”.

I can’t get how to do this last step and reference the strings in “pt.yml” inside “index_pt.html”. What would you advise?

Take a look at the Jekyll gems that are listed in the resource section. You could use one of them, or look at the code for some hints and pointers