hector-sab / hectorsabblog

1 stars 0 forks source link

Change the "pages" name in another language #3

Closed hector-sab closed 1 year ago

hector-sab commented 1 year ago

The website has a home page showing all new pages. However, when changing the language of the website, it still shows "pages" instead of "paginas". image

hector-sab commented 1 year ago

Found this website on the Hugo docs, but nothing yet about how to change this behavior. Note that now I am changing the "slug" of the about page! I am unsure of what's the "best" slug in Spanish...

https://www.regisphilibert.com/blog/2018/08/hugo-multilingual-part-1-managing-content-translation/

hector-sab commented 1 year ago

Found it by chance! So, if you have for example content/en/posts/ and content/es/posts/, to change "posts" to "publicaciones" in Spanish, you have to create the content/es/posts/_index.md and add the title: "Publicaciones". I assume that for the pages, as I am not following a directory structure, it needs to be something like pages/_index.es.md.