Open jmooring opened 4 weeks ago
would be a lot simpler if the default content language were hardcoded to the the lightest weighted/sorted language.
I think this mostly comes from a time where we needed the value of defaultContentLanguage
before we had bult the languages/sites slice.
But the above slice also defines the default sort order of languages (as seen in .AllTranslations
) used in language selectors, so it's not a strange requirement to be able to control. that order independently from defaultContentLanguage
.
This isn't anything recent... the problem has been present since v0.119.0.
Background
In a multihost configuration, when you run
hugo server
, the console displays something like:We added the language key to the end of each line in v0.119.0 via #11442.
Problem
If the default content language does not correspond to the first site by weight (or language key fallback), the wrong language key is displayed at the end of each line.
Example
When I run
hugo server
I see this in the console:But
http://localhost:1314/
is serving the DE site, whilehttp://localhost:1313/
is serving the EN site.Commentary
It seems like this, and similar areas of the code base, would be a lot simpler if the default content language were hardcoded to the the lightest weighted/sorted language. I guess I've never understood the use case for the configuration above.