So I noticed something odd. As you might know, sometimes it produces better search results when you use Google to search Meta . So I went to Google, entered my query, found my topic, and suddenly noticed that the topic title in the browser tab (not in the topic itself!) and the name of the category, and that category alone, were translated into Dutch.
Oddly, this disappeared when I clicked to another page on Meta.
After some confusion I found that this was caused by the fact that the topic had ?tl=nl attached to the URL, and that this was added by Google.
So I’m logged in, and the tl parameter was only supposed to work for anonymous users. But apparently it does affect some elements if you’re logged in.
Now let’s try this while logged out and see what happens. That should work, right?
So back to why this parameter ended up in a search engine.
As a matter of fact, the topic appears twice in Google, once with ?tl=nl and once without. Funny detail is that the title and snippet of the one with the parameter are not in Dutch, it’s in English just like the other one.
To make things more interesting, the canonical URL in the source does not have the parameter, so why Google indexed it with the parameter is unclear to me.
the tl parameter is only supposed to work for anonymous users (per the description of Set locale from param setting) but for logged in users it does affect the <title> and category.
it somehow ends up in Google (although I wouldn’t know how to prevent this since Google apparently ignores canonical ?)
for anonymous users the tl parameter works only partially and it does not persist. It is not passed between requests and it does not seem to be setting a cookie (at least, not on Meta)
set ?tl
everything is Chinese
navigate to a topic
see how only the categories are in Chinese
navigate “back”
see how the welcome banner, categories are still in Chinese but the topics are English
The typical user flow that this is generally built for is like this:
Diego has browser language settings to Spanish
He searches for problem in Spanish
He sees a result leading to meta (it ends with tl=es)
He goes into meta, reads the result in Spanish
He continues surfing the site in meta (because his browser language is set to Spanish)
There are a few things at play here which could throw things off course, like if the topic’s posts have not been translated yet as above, which is likely (can’t say for sure) the reason why you saw two results in Google since we’re presenting English as Dutch. One of the things we internally decided to do was believe in eventual consistency, though I would have to check why those quite-new posts have not yet been translated since April.
My search term for the Google screenshot I provided in this topic were “How to have multiple copies of default theme”, because I was explicitly targeting that topic in order to make the screenshot. My original search term was “discourse duplicate theme”, and that was the search result that led me to the first screenshot (you can still see the search term in the top right there).
As you can see in the screenshot of the Google search results page, Google also offers me a mixture of English and Dutch. It’s probably doing that because I am physically located in the Netherlands. When I travel to Germany it will give me a mixture of English and German. My theory is that the ?tl=nl search result might have been slipped in by Google because of my location (which is stupid but yeah). Still, I don’t expect any Dutch language on Meta when I am logged in.
Yeah, I think you’ve presented a case here which isn’t something that we’ve known to see. I definitely do not expect Google to insert Dutch if you’ve not set that up anywhere.