# Receiving mails in the prefered language in rails

**URL:** <https://www.ruby-forum.com/t/receiving-mails-in-the-prefered-language-in-rails/196309>\
**Category:** Rails I18n\
**Created:** [October 11, 2010, 12:13pm UTC](https://www.ruby-forum.com/t/receiving-mails-in-the-prefered-language-in-rails/196309 "2010-10-11T12:13:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arunachandu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d6d6ee/32.png) [@arunachandu](https://www.ruby-forum.com/u/arunachandu)\
**Post date:** [October 11, 2010, 12:13pm UTC](https://www.ruby-forum.com/t/receiving-mails-in-the-prefered-language-in-rails/196309/1 "2010-10-11T12:13:03Z")

</div>

I am working in ROR. we have 2 translations one in En.yml and another  
for german . We will set the translation and the whole application will  
be seen in the selected language .

We have a functionality of sending notification mails when the user  
receives comments for his post.

This functionality expects to be like to receive the mails in the  
language that the user who is commenting .

For eg. As far now we are receiving mails like

A commented your post.

But it expects to be in German even in mails.

How tat is possible…

Please give some suggestions

---

<div class="post-metadata">

**Author:** ![arunachandu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d6d6ee/32.png) [@arunachandu](https://www.ruby-forum.com/u/arunachandu)\
**Post date:** [October 11, 2010, 12:26pm UTC](https://www.ruby-forum.com/t/receiving-mails-in-the-prefered-language-in-rails/196309/2 "2010-10-11T12:26:48Z")

</div>

You could add a preferred language field to your user model and then use  
that in your mailer to decide what language you should use for the  
message.
