Hi,

I'm using gettext 1.7.0 and rails 1.1.4.

Gettext won't translate:

   * the subject line of my e-mail
   * the view that renders its body.

I have followed the integration guide at:
http://manuals.rubyonrails.org/read/chapter/105

Here's what my application controller looks like:

class ApplicationController < ActionController::Base
  before_filter :init_gettext
  def init_gettext
    bindtextdomain("myapp", request.cgi)
  end

Here's my ActionMailer:

class OrderMailer < ActionMailer::Base
  def confirm(order)
    @subject    = _("Your order with myapp")

The subject is not translated unless I call bindtextdomain right before.

The rhtml template that generate the body is just not translated at all.
I can still create localized versions of it:
cp app/views/order_mailer/confirm.rhtml 
app/views/order_mailer/confirm_fr.rhtml
but that's a little bit disapointing.

Any idea how to get that _() function to work everywhere ?

Thanks,

     Stephane.

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

Reply via email to