Saturday, 7 September 2013

Rails 4 i18n on activerecord attributes

Rails 4 i18n on activerecord attributes

I'm wondering about something with Rails 4 and i18n. I've set up some
attributes like this:
en:
activerecord:
models:
tutor: Tutor
attributes:
tutor:
country: Country
rate: Rate
ja:
activerecord:
models:
tutor: ƒ`ƒ…[ƒ^[
attributes:
tutor:
country: 'Ð
rate: —¿&lsqauo;à
In my view I am now doing the following:
<%= table_sort( t('activerecord.attributes.tutor.rate') ) %>
Is activerecord.attributes.tutor.rate correct or is there any shorter,
better or preferred way to translate table column names?
Cheers!

No comments:

Post a Comment