I18n: What is the difference between using 't(:test_key)', 't('test_key')' and 't('.test_key')'?
问题 I am using Ruby on Rails 3.1 and I would like to know how , when and why I should use one of the following code rather than another on internationalizing my application (I18n gem): t(:test_key) t('test_key') t('.test_key') That is, what is the "subtle" difference between using t(:test_key) , t('test_key') and t('.test_key') ? What are best practices about this issue? 回答1: I think first two are equivalent and you just refer to main key in your translations, fo example t('hello_world') # t(