Saturday, March 3, 2012

[Rails] string translation not working in view,

I haven't change any locales so by default it is set to :en.
In validation error its perfectly picking right string from en.yml.

But still in view for normal string translation its not working. e.g
<%=t :hello %>
is printing "Hello " only.


While my config/locales/en.yml is like below:
en:
hello: Hello world

en:
activerecord:
attributes:
user:
uEmail: "E-mail address"
uPassword: "Password"
uPassword_confirmation: "Password confirmation"
errors:
models:
user:
attributes:
Uemail:
blank: "is required"

Any suggestion please ?
ruby 1.8.7
rails 3.2.1

Thanks,
Amit Suthar

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate