日本語に設定
config/application.rb
config.i18n.default_locale = :ja
モデル関連
hoge.yml
ja:
activerecord:
models:
hoge: ほげ
attributes:
hoge:
huga: ふが
hoge.html.haml
= Hoge.model_name.human # => ほげ
= Hoge.human_attribute_name(:huga) # => ふが
その他
foo.yml
ja:
label:
foo: ふー
messages:
bar: ばー
foo.html.haml
= t('label.foo') # => ふー
= t('messages.bar') # => ばー