Translation in .yml with optional parameter
问题 I want to make a translation my_translation with an optional parameter. For example: > I18n.t('my_translation') => "This is my translation" > I18n.t('my_translation', parameter: 1) => "This is my translation with an optional parameter which value is 1" Is this possible? 回答1: Yes, definitely. You just write the translations like this: my_translation: This is my translation with an optional parameter which value is %{parameter} Is the parameter really optional? In above translation, you have to