Rails3 + HAML generated templated contains localization. For example to translate 'show'
%td.action= link_to t('show'), tidbit
I just have to add follwing to en.yml
en:
show: "Show"
but when attributes to be translated starts with a dot as in the case of '.newtidbit', this does not work.
%p= link_to t('.new_tidbit'), new_tidbi开发者_高级运维t_path
If you prefix your translate keys with a period it's going to do a "lazy lookup". So you'll have to define the translation under your controller and view name such as:
en:
tidbits:
index:
new_tidbit: New Tidbit
(I'm guessing on the name of your controller and view file of course but you get the idea)
精彩评论