# ?tl parameter behaving oddly

**URL:** https://meta.discourse.org/t/tl-parameter-behaving-oddly/384806
**Category:** Bug
**Tags:** content-localization
**Created:** [October 6, 2025, 3:55pm UTC](https://meta.discourse.org/t/tl-parameter-behaving-oddly/384806 "2025-10-06T15:55:44Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [October 6, 2025, 3:55pm UTC](https://meta.discourse.org/t/tl-parameter-behaving-oddly/384806/1 "2025-10-06T15:55:44Z")

</div>

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.

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/7/8/2782628897df3a27d5e81197ae5e249e728ee5e7.png)

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?

Well. Not really.

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/e/a/5eac5d27b14297581277f7aec76430a90a0e9344.png)

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.

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/5/4/154b45602a09b09f924a96dff0ea561ca9bbb849.png)

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.

`<link rel="canonical" href="https://meta.discourse.org/t/how-to-have-multiple-copies-of-default-theme/359789">`

So we have:

- 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)

---

<div class="post-metadata">

### Author: ![nat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nat/32/235063_2.png) [@nat](https://meta.discourse.org/u/nat)
#### Post date: [October 7, 2025, 3:37am UTC](https://meta.discourse.org/t/tl-parameter-behaving-oddly/384806/4 "2025-10-07T03:37:55Z")

</div>

Hey, thanks for helping us try out translated search results (albeit incidentally) and reporting your findings. Much appreciated.

I can address a few of the items here but will also need you to answer some questions

- What language is your **browser** set to when you searched on Google?
- What search term are you using?

Somehow it appears your browser settings might be Dutch (which explains “Meer om te vragen”) but your search term is in English.

* * *

> [@RGJ](#):
>
> ![image](https://global.discourse-cdn.com/meta/original/4X/2/7/8/2782628897df3a27d5e81197ae5e249e728ee5e7.png)

The topic you’ve referred to ([How to have multiple copies of Default theme?](https://meta.discourse.org/t/how-to-have-multiple-copies-of-default-theme/359789)) unfortunately is showing up as such because

- the topic title is translated ✔
- none of the posts are translated ❌

That is why we see all posts in English (at this point of time) but the title is in Dutch.

* * *

The `tl` parameter setting was added long before we introduced crawler indexing for translations…

 ![tl param setting](https://global.discourse-cdn.com/meta/original/4X/d/7/6/d76894d8e22f6c47ce7593ef37a3f96277547364.png)

Technically speaking, [the locale param should only be considered for anonymous users](https://github.com/discourse/discourse/blob/ac554f1f60b95b403c1015899ffa384296cdef46/lib/discourse.rb#L1222-L1228). Can you confirm what your user profile language is?

* * *

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.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [October 7, 2025, 7:12am UTC](https://meta.discourse.org/t/tl-parameter-behaving-oddly/384806/5 "2025-10-07T07:12:29Z")

</div>

> [@nat](#):
>
> - What language is your **browser** set to when you searched on Google?
> - What search term are you using?

> [@nat](#):
>
> Can you confirm what your user profile language is?

TL;DR I exclusively use English for everything around Discourse.

Everything in my browser is set to English (US).  
My user profile language on Meta is also English.

My browser sends `Accept-Language: en-Us,en;q=0.5` and nothing else.

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/6/8/e68fb9de4057ac601e6fcaa9648bc9e18e8f2982.png)

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.

---

<div class="post-metadata">

### Author: ![nat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nat/32/235063_2.png) [@nat](https://meta.discourse.org/u/nat)
#### Post date: [October 7, 2025, 7:57am UTC](https://meta.discourse.org/t/tl-parameter-behaving-oddly/384806/6 "2025-10-07T07:57:20Z")

</div>

> [@RGJ](#):
>
> ![image](https://global.discourse-cdn.com/meta/original/4X/1/5/4/154b45602a09b09f924a96dff0ea561ca9bbb849.png)

> [@RGJ](#):
>
> 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).

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.

---

<div class="post-metadata">

### Author: ![nat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nat/32/235063_2.png) [@nat](https://meta.discourse.org/u/nat)
#### Post date: [November 11, 2025, 6:15am UTC](https://meta.discourse.org/t/tl-parameter-behaving-oddly/384806/7 "2025-11-11T06:15:36Z")

</div>

@RGJ there was a report here as well - ["Set locale from param" and content localisation issue](https://meta.discourse.org/t/set-locale-from-param-and-content-localisation-issue/387547) - and the implementation of the language param has been refined.

We should see that the site setting should stay true to its description that it applies only for anons, as we don’t want a param to update a logged-in user’s preferences defined in user profile.

---

<div class="post-metadata">

### Author: ![nat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nat/32/235063_2.png) [@nat](https://meta.discourse.org/u/nat)
#### Post date: [November 15, 2025, 12:00am UTC](https://meta.discourse.org/t/tl-parameter-behaving-oddly/384806/8 "2025-11-15T00:00:12Z")

</div>

This topic was automatically closed after 3 days. New replies are no longer allowed.
