I agree , not very clear .... I was referring to mailer template
views
I tested many cases and it seems I need to define .en_GB views
( including the locale)
I am using already the fallback...
config.i18n.fallbacks = true
config.i18n.default_locale = :en_EN
but I am concerned by mailer ? which seems to handle locale
differently. Here is a case :
I am logged in as current_user
I select :en_ES as locale for display
I visit the site ..
and I some point the system need to send a message to the site
admin...
as mailer views I MUST have templates like : welcome.en_GB.html.erb
and NOT welcome.html.erb
I agree , not very clear .... I was referring to mailer template
views
I tested many cases and it seems I need to define .en_GB views
( including the locale)
I am using already the fallback...
config.i18n.fallbacks = true
config.i18n.default_locale = :en_EN
but I am concerned by mailer ? which seems to handle locale
differently. Here is a case :
I am logged in as current_user
I select :en_ES as locale for display
I visit the site ..
and I some point the system need to send a message to the site
admin...
as mailer views I MUST have templates like : welcome.en_GB.html.erb
and NOT welcome.html.erb
Huh? That doesn't sound correct to me. Specifying the locale in the template filename seems very odd. Can you point me at documentation on where this would required?
class ActionMailer::Localized < ActionMailer::Base
private
# we override the template_path to render localized templates (since
rails does not support that )
# This thing is not testable since you cannot access the instance of
a mailer...
def initialize_defaults(method_name)
super
@template = "#{method_name}.#{I18n.locale}"
end
end
seems to be a very bad idea... I'm moving to another folder
structure,