# 电子邮件未尊重用户区域设置的文本方向

**URL:** <https://meta.discourse.org/t/emails-are-not-respecting-the-direction-of-a-users-locale/149528>\
**Category:** UX\
**Created:** [2020年四月27日 23:12 UTC](https://meta.discourse.org/t/emails-are-not-respecting-the-direction-of-a-users-locale/149528 "2020-04-27T23:12:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [2020年四月27日 23:12 UTC](https://meta.discourse.org/t/emails-are-not-respecting-the-direction-of-a-users-locale/149528/1 "2020-04-27T23:12:40Z")

</div>

对于允许用户设置其语言环境的网站，如果用户的语言环境文本方向与网站默认语言环境的文本方向不同，则该语言环境的文本方向不会被应用到从 Discourse 发送的电子邮件中。这是 Discourse 在 2016 年处理电子邮件中用户语言环境方式的一种回归：[https://meta.discourse.org/t/emails-for-rtl-languages-have-ltr-direction/41972/2。](https://meta.discourse.org/t/emails-for-rtl-languages-have-ltr-direction/41972/2%E3%80%82)

我们仍在 [`send_notification_email`](https://github.com/discourse/discourse/blob/master/app/mailers/user_notifications.rb#L472) 方法中将 `local` 设置为用户的 `effective_locale`，但该设置并未用于设置电子邮件的文本方向。

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2021年三月7日 21:11 UTC](https://meta.discourse.org/t/emails-are-not-respecting-the-direction-of-a-users-locale/149528/2 "2021-03-07T21:11:54Z")

</div>

我们需要估算一下这项工作的投入，@simon 你能帮忙做一下吗？
