I correctly defined some basic translations and multi language content for my languages (English, Italian and Portuguese) and I can display them as expected: mydomain/about, mydomain/it.about, mydomain/br/about… and so on.
However, I would like to display the url of the english pages also with the ‘en’ slug, for sake of consistency. As far as I understand, if I define DefaultContentLanguageInSubdir as true in my config.toml, that would be achieved, but this is not the case. I experimented with the true and false, publishing and comparing the published folder: they are absolutely identical.
Of course, there’s something I misunderstood. Could someone kindly point me to the right direction?
Here it is my bare config. I started from scratch, just to check everything. Same behaviour…
# general setup
baseurl = "http://replace-this-with-your-hugo-site.com/"
title = "My New Hugo Site"
theme = "hugo4"
# languages
languageCode = "en-us"
defaultContentLanguage = "en"
defaultContenLanguageInSubdir = "true"
[languages.en]
[languages.it]
[languages.br]
When I browse, I still have the english ‘about’ page under mydomain/about and the italian and portugues version respectively under mydomain/it/about and mydomain/br/about.
Any clue?
Well, I do not have how to provide a link, as I’m working on a local machine. Have you some ready multi language skeleton which work as intended, to use as a reference and to learn from?
I’m also interested in any good multi-language template/skeleton with best practices included (menus, localizations for typical content like posts and unique custom pages).
I’ve began to create such an example in my theme “MoodleBox”: It’s not finished, but you may find something useful. See it in action here: moodlebox.net
from the end to almost the beginning of the toml file and they began working as expected. Of course, it is strange to me that the place in the toml file had such an impact (i.e., that when the commands were at the end of the file, they were ignored).