You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A long time ago, I asked why config/_default/languages.tomlconfig/_default/menus.tomlconfig/_default/params.toml where separated like this, and some answered because Hugo says so.
Frankly, I believe config/_default/menus.toml should disappear and a bunch of parameters which are actually in config/_default/params.toml should be in config/_default/languages.toml which will be more natural to make our website truly multi-lingual and easier to understand by the user, let's me show you by a examples...
1. I don't have menus.toml and everything works
2. When people visit my website in French they actually have it in French with 0 English
It would sound little, but for me when I see a website mixing 2 languages on the same page it make me feel
or the person don't really speak the language and/or the website is not completed and/or just hobbyist (not serious).
So how I did that ?
I simply move parameters which need a translation under languages.toml and removed/commented them inside params.toml
With this logic, everything related to language and/or possibly need to be translated could be found and declare in one single file instead of a little bit inside params.toml and a little inside menus.toml and the rest in languages.toml
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
A long time ago, I asked why
config/_default/languages.toml
config/_default/menus.toml
config/_default/params.toml
where separated like this, and some answered because Hugo says so.Frankly, I believe
config/_default/menus.toml
should disappear and a bunch of parameters which are actually inconfig/_default/params.toml
should be inconfig/_default/languages.toml
which will be more natural to make our website truly multi-lingual and easier to understand by the user, let's me show you by a examples...1. I don't have menus.toml and everything works
2. When people visit my website in French they actually have it in French with 0 English
It would sound little, but for me when I see a website mixing 2 languages on the same page it make me feel
or the person don't really speak the language and/or the website is not completed and/or just hobbyist (not serious).
So how I did that ?
I simply move parameters which need a translation under languages.toml and removed/commented them inside params.toml
With this logic, everything related to language and/or possibly need to be translated could be found and declare in one single file instead of a little bit inside params.toml and a little inside menus.toml and the rest in languages.toml
Does it make sense for you ?
Beta Was this translation helpful? Give feedback.
All reactions