# Override \<html lang=\> on default.hbs at post.hbs

**URL:** https://forum.ghost.org/t/override-html-lang-on-default-hbs-at-post-hbs/32797
**Category:** Themes
**Created:** [September 15, 2022, 8:29pm UTC](https://forum.ghost.org/t/override-html-lang-on-default-hbs-at-post-hbs/32797 "2022-09-15T20:29:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ManaSiWIbi](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@ManaSiWIbi](https://forum.ghost.org/u/ManaSiWIbi)
#### Post date: [September 15, 2022, 8:29pm UTC](https://forum.ghost.org/t/override-html-lang-on-default-hbs-at-post-hbs/32797/1 "2022-09-15T20:29:00Z")

</div>

So, I’m blogging in 2 languages. It’s not specifically a multi-language site. I made an internal tag for the language at every post.

Is it even possible to override the `<html lang="">` based on the internal tag at post.hbs?

It’s like, if the post has an internal tag of “EN”, change the default locale of `<html lang="{{@site.locale}}"> ` to `<html lang="EN">`

---

<div class="post-metadata">

### Author: ![ahmadajmi](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ahmadajmi/32/23173_2.png) [@ahmadajmi](https://forum.ghost.org/u/ahmadajmi)
#### Post date: [September 16, 2022, 1:26pm UTC](https://forum.ghost.org/t/override-html-lang-on-default-hbs-at-post-hbs/32797/2 "2022-09-16T13:26:28Z")

</div>

Here is an example of how I can do it.

```auto
<HTML lang='{{{ block 'language' }}}'>

```

Then, all template files like `tag.hbs`, and `author.hbs`.

```auto
{{#contentFor 'language'}}{{ @site.locale }}{{/contentFor}}

```

And in the `post.hbs` file.

```auto
{{#contentFor 'language'}}{{#has tag='#EN'}}EN{{else}}{{ @site.locale }}{{/has}}{{/contentFor}}

```

Make sure the above line is inside the `{{#post}} {{/post}}` helper.

* * *

I used the `block` and `has` helpers, which you can learn more about.

> **[Ghost Handlebars Theme Helpers: block & contentFor](https://ghost.org/docs/themes/helpers/block/)**
>
> Create templates that inherit reusable templates with handlebars block and contentFor helpers. Read more about Ghost themes! 👻

> **[Ghost Handlebars Theme Helpers: has](https://ghost.org/docs/themes/helpers/has/)**
>
> \#has allows theme developers to ask questions about the current context and provides more flexibility ⚡️ Read more about custom Ghost themes!

---

<div class="post-metadata">

### Author: ![ManaSiWIbi](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@ManaSiWIbi](https://forum.ghost.org/u/ManaSiWIbi)
#### Post date: [September 16, 2022, 3:10pm UTC](https://forum.ghost.org/t/override-html-lang-on-default-hbs-at-post-hbs/32797/3 "2022-09-16T15:10:58Z")

</div>

Yep, that’s what I need. Thank you
