There are plenty of issues if you try to do this with ActionMailer in
places like LoginEngine, etc; however, if you create a mailer in your
root app, it does it mighty fine with no hassles.

$RAILS_ROOT> script/generate mailer Mailer

This will create a file RAILS_ROOT/app/model/mailer.rb

Use the _() in this new model after setting your locale, just as in a
controller.

Other benefits include much easier sweeping of the tagged strings into
your stock .po files.

---
Myk Oleary
Web Services Developer
Pure Networks
[EMAIL PROTECTED]


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Roland
Sent: Thursday, March 29, 2007 10:08 AM
To: [email protected]
Subject: Re: [Rails I18n] GetText doesn't work in ActionMailer

This problem is still existant with Rails 1.2.3 and gettext 1.9.0.

Strings in ActionMailer don't get translated with the _() method, they 
don't appear at all (not even the base language).

This is very annoying because it forces me to hardcode all text blurbs 
in language dependent files (that works as reported before) e.g. 
text_en.rhtml, text_de.rhtml, ...

Is there maybe a way to fix it?

thank you in advance,
best regards

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Railsi18n-discussion mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/railsi18n-discussion
_______________________________________________
Railsi18n-discussion mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/railsi18n-discussion

Reply via email to