Thanks Henrik , no change in Rails 3
easier mgt of form labels however...

On 24 sep, 19:40, Henrik Nyh <[email protected]> wrote:
> On Fri, Sep 24, 2010 at 19:22, Erwin <[email protected]> wrote:
> > I am trying to localize in Rails 3, and I don't understand the change
> > w Rails 2 ...
>
> > I wrote the following hierarchy :
>
> > en:
> >  model:
> >    user: User
> >    attributes:
> >      login: Login
> >      email: Email
> >      password: Password
> >      roles: Roles
>
> > and tried to use  in my view   I18n.t('user.roles')  to get the
> > localization of roles
> > but cannot find it :   translation missing: fr, user, roles
>
> > In rails 2 I had to stipulate activerecord:  should I do it also w
> > Rails 3 ?
>
> Haven't used Rails 3 myself. Just try it and see, though. I would
> guess you need to put the translation in
> activerecord.attributes.user.roles.
>
> Once you use that convention, you can do
> User.human_attribute_name(:roles) instead of
> I18n.t("activerecord.attributes.user.roles"). Assuming that didn't
> change from Rails 2.

-- 
You received this message because you are subscribed to the Google Groups 
"rails-i18n" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-i18n?hl=en.

Reply via email to