# Lang attribute doesn't change when changing locale on profile

**URL:** <https://meta.discourse.org/t/lang-attribute-doesnt-change-when-changing-locale-on-profile/52830>\
**Category:** Feature\
**Created:** [Novembre 12, 2016, 4:12 UTC](https://meta.discourse.org/t/lang-attribute-doesnt-change-when-changing-locale-on-profile/52830 "2016-11-12T16:12:07Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [Novembre 13, 2016, 8:11 UTC](https://meta.discourse.org/t/lang-attribute-doesnt-change-when-changing-locale-on-profile/52830/6 "2016-11-13T08:11:51Z")

</div>

I think a custom JS script is more appropriate here.

```plaintext
// pseudocode
discourse_api_on_load_i_forget_how_that_ones_written(function() {
  if (user.locale == 'ar') {
    var st = document.createElement('style');
    st.innerHTML = "html {font-family: 'Noto Naskh Arabic', serif !important; }";
    document.head.appendChild(st);
  }
})

```

---

_[View the full topic](https://meta.discourse.org/t/lang-attribute-doesnt-change-when-changing-locale-on-profile/52830)._
