Language

Hello my friends, how are you, I need the help of some expert, I happen to use the Coder template and in the blog part the language, for example, the date of the post is in Portuguese and I realized that there is a whole folder dedicated to In that language, what I want is to replace that folder where all the contents are in Portuguese and change it to Spanish, thank you

Post a link to your repository and I’m sure we can help you out.

You have set up your site with English as the main language and added Brasilian Portuguese (pt-br) as a second language. Looks like you copied the “exampleSite” of the theme straight of.

The code for Spanish is “es” so if you want Spanish on your site as well do the same thing for “es” as you have done for “pt-br”.

In “config.toml” find all the places where “pt-br” is mentioned and replace with “es”.

Inside content directory you find files like “about.md” vs about.pt-br.md". That is the English vs the Brasilian Portuguese about page.

If you want a Spanish about page you create “about.es.md”.

See more in the documentation Multilingual mode | Hugo

Instead of adding the language to the file name you can use sub directories for languges. The end result (i.e. the web site) is the same so it up how one likes to organise the content.

I’ll do it right away and test it, wait a moment and I’ll let you know if there were any changes.

thanks for the help it worked

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