# Unexpected language code

**URL:** https://meta.discourse.org/t/unerwarteter-sprachcode/402544
**Category:** Bug
**Tags:** translation, fixed, content-localization
**Created:** [May 9, 2026, 5:23am UTC](https://meta.discourse.org/t/unerwarteter-sprachcode/402544 "2026-05-09T05:23:37Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [May 9, 2026, 3:05pm UTC](https://meta.discourse.org/t/unerwarteter-sprachcode/402544/3 "2026-05-09T15:05:31Z")

</div>

I think the invalid code comes from Discourse.

> <https://github.com/discourse/discourse/blob/0ae63cf570518910042eb864c2acc7ef8e8374a5/app/views/common/_hreflang_tags.html.erb#L8>

Maybe instead of `hreflang="<%= locale %>"` it should be `hreflang="<%= locale.tr('_', '-') %>"` to replace the underscore.

---

_[View the full topic](https://meta.discourse.org/t/unerwarteter-sprachcode/402544)._
