试图为i18n干掉我的en.yml:
en:
phone: 800-123-4678
errors:
please_call: Please call 800-123-4678
please_call2: Please call 800-123-4678 if you need assistance
有没有办法引用先前定义的标量并在另一个中进行插值?
答案 0 :(得分:0)
尝试
en:
phone: 800-123-4678
errors:
please_call: Please call <%= phone %>
please_call2: Please call <%= phone %> if you need assistance
没试过,但发现another answer说它应该有效。试一试:)