# Why is RTL class user dependent instead of locale?

**URL:** <https://meta.discourse.org/t/why-is-rtl-class-user-dependent-instead-of-locale/54077>\
**Category:** Development\
**Created:** [2016 年 12 月 11 日午前 3:04 UTC](https://meta.discourse.org/t/why-is-rtl-class-user-dependent-instead-of-locale/54077 "2016-12-11T03:04:10Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ibnesayeed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ibnesayeed/32/120427_2.png) [@ibnesayeed](https://meta.discourse.org/u/ibnesayeed)\
**Post date:** [2016 年 12 月 11 日午前 4:17 UTC](https://meta.discourse.org/t/why-is-rtl-class-user-dependent-instead-of-locale/54077/5 "2016-12-11T04:17:27Z")

</div>

> [@simon](#):
>
> It just means that the class can’t be eliminated without changing a few other things as well.

Such as, lines 389 and 401

> <https://github.com/discourse/discourse/blob/ad5d16af8ed0257fd14ed54d060946dbda6f8db1/app/mailers/user_notifications.rb#L388-L390>

become (if `direction` property is defined on locale)

```ruby
classes: user.effective_locale.direction

```

or (if `rtl?` method is defined on locale)

```ruby
classes: user.effective_locale.rtl? ? 'rtl' : ''

```

---

_[View the full topic](https://meta.discourse.org/t/why-is-rtl-class-user-dependent-instead-of-locale/54077)._
