# Localized tags are not slugified

**URL:** https://meta.discourse.org/t/localized-tags-are-not-slugified/398105
**Category:** Bug
**Tags:** content-localization
**Created:** [March 10, 2026, 9:32pm UTC](https://meta.discourse.org/t/localized-tags-are-not-slugified/398105 "2026-03-10T21:32:25Z")
**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: [March 10, 2026, 9:32pm UTC](https://meta.discourse.org/t/localized-tags-are-not-slugified/398105/1 "2026-03-10T21:32:25Z")

</div>

If tags are localized, either

- via the API
- via AI translation
- via the experimental tag settings page

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

The name is not slugified, leading to all kinds of issues when there is whitespace or quotes in them.  
TBH I wonder if the body classes should contain the localized tags at all.

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

This also causes weird issues when the tags are displayed underneath the topic title.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 10, 2026, 10:52pm UTC](https://meta.discourse.org/t/localized-tags-are-not-slugified/398105/2 "2026-03-10T22:52:23Z")

</div>

@nat probably reaching here but could this have been fixed by:

> [@在 Slug 生成方法为 none 情况下，创建新标签后无法正常显示新版编辑标签功能](https://meta.discourse.org/t/slug-none/397789/10):
>
> Fixed here: [https://github.com/discourse/discourse/pull/38376](https://github.com/discourse/discourse/pull/38376) Thank you for your report!

---

<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: [March 10, 2026, 11:32pm UTC](https://meta.discourse.org/t/localized-tags-are-not-slugified/398105/3 "2026-03-10T23:32:39Z")

</div>

This is not about the slug, it’s about the sluggified name (I hope you’re still with me)

A tag with name `my-name` and slug `my-slug` will live at `/tag/my-slug/ID` and it has a body class of `tag-my-name`.

Where the regular tag `name` field in the tag edit page will remove all special characters (`my-name"(123)` will save as `my-name123`), the name fields in the localizations do not, nor are they properly sluggified on output.

A tag with name `my-name` and a Dutch localization of `mijn-naam` will get the `tag-mijn-naam` body class.

A tag with name `my-name` and a Dutch localization of `mijn-naam" (123)` will get a `tag-mijn-naam" (123)` body class which breaks a lot of things.

Slug generation method is set to `ascii` btw.

---

<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: [March 11, 2026, 3:29am UTC](https://meta.discourse.org/t/localized-tags-are-not-slugified/398105/4 "2026-03-11T03:29:16Z")

</div>

Thanks, let me have a look.

---

<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: [March 12, 2026, 6:43am UTC](https://meta.discourse.org/t/localized-tags-are-not-slugified/398105/7 "2026-03-12T06:43:48Z")

</div>

We’ve merged a fix that cleans the localized tag names after it is returned from the LLM, and also a post migration that cleans the existing “dirty” localized tag names.

[https://github.com/discourse/discourse/pull/38488](https://github.com/discourse/discourse/pull/38488)

Also note, the PR indicates that the post migration does have some application logic for cleaning tags, but we should be safe here with certain conditions and tests.

I’ll keep this topic open to see how it turns out for you.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 24, 2026, 6:58am UTC](https://meta.discourse.org/t/localized-tags-are-not-slugified/398105/8 "2026-08-24T06:58:39Z")

</div>


