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
{{ message }}
Repository navigation
Auto-Language-Detection on the nette website is extremely annoying #1054
I'm using several Nette components like Latte and love it. Thank you for your great work!
When I need to lookup some informations I go to google and type something like nette latte syntax off.
I then click on the first search result and - unfortunately - land on the docs in GERMAN, as I am from Austria. This might be helpful to some, but for me is this ennoying me every time I have to look something up, as in programming the main language is english and many translations just dont make sense. I want the terms "margin", "padding", "border" etc. to always be those terms and not be translated to "Rahmen" or such.
"Just change the language in the header" you might suggest.
Yes and no...
First, it's annoying to do this over and over again.
Second, if you are further down the page the GUI for changing the language is hidden:
Jump into the shoes of the website visitor and tell me: Where do I change the language from german to english???
IMHO this is really getting annoying and therefore I wanted to report it.
It would be great if you could either turn off this auto language "feature" or if that is not possible add a feature where the website remembers my last chosen language via localStorage for example. That way everybody could choose his/her preferred language and first time visitors get presented the website in the language of their OS.
Hi @dg that's a very good question :) It's the german version even though I thought it was english, but the search term "nette latte tags" are listed on the german version as well, so google is the issue here.
Still it would be very handy if the nette website remembered my language choice and then did the redirect to EN even when coming from the german google search result!
Sorry for leaving this open for so long. Here's where I ended up.
The site doesn't redirect anyone based on their language. A page like /de/tags is always German and /en/tags always English. What happened to you is that Google picked the German version for a German-speaking user, which is exactly what the hreflang links on every page ask it to do.
I'd like to keep it that way, for two reasons:
The translations are now really good, not the machine-translated pages you may remember. For many readers, documentation in their own language is a real help, and code, CSS properties and API names are never translated.
Google explicitly advises against redirecting users to another language version automatically. Googlebot doesn't keep cookies, so it would see different content than users do.
But you're right that switching should be painless, and that the site should remember your choice. So here's the plan:
When you switch the language, the site remembers it.
When you later land on a page in a different language (e.g. from Google), you'll see a small, unobtrusive notice offering the version in your language, one click away. No forced redirect.
The language switcher will be reachable from anywhere on the page, not only at the top.
Thanks for the push, and for the kind words about Latte!
Activity
dg commentedon Sep 1, 2024
And what URL exactly does the link lead to?
BernhardBaumrock commentedon Sep 2, 2024
Hi @dg that's a very good question :) It's the german version even though I thought it was english, but the search term "nette latte tags" are listed on the german version as well, so google is the issue here.
Still it would be very handy if the nette website remembered my language choice and then did the redirect to EN even when coming from the german google search result!
dg commentedon Sep 11, 2024
@BernhardBaumrock I'm not sure if this could be perceived by google as an unfair practice. I'll try to find out.
BernhardBaumrock commentedon Sep 11, 2024
Thank you very much @dg
dg commentedon Oct 28, 2026
Sorry for leaving this open for so long. Here's where I ended up.
The site doesn't redirect anyone based on their language. A page like
/de/tagsis always German and/en/tagsalways English. What happened to you is that Google picked the German version for a German-speaking user, which is exactly what thehreflanglinks on every page ask it to do.I'd like to keep it that way, for two reasons:
But you're right that switching should be painless, and that the site should remember your choice. So here's the plan:
Thanks for the push, and for the kind words about Latte!