views:

20

answers:

1

Hi , I am new to rails.. I am having a line in the mailing queue.rb file as

subject ="Mail : Welcome to app"

I have added translation for Welcome to app as

        str_welcome: "Welcome to app"

Now i am trying to replace Welcome to app in the file with the str_welcome

how to do that as i have another prefix ("Mail") also ..

+3  A: 

Use the i18N inside Rails

subject = i18N.t('str_welcome')

All about i18n in rails : http://guides.rubyonrails.org/i18n.html

shingara
I am having a String Mail: which needs to be appended to str_welcome
Aruna
I take it you're asking more than just how to do : `subject = i18N.t('mail_prefix') + i18N.t('str_welcome')`, but I'm not clear what more.
Shadwell