【发布时间】:2013-11-11 19:23:57
【问题描述】:
我需要根据数字对文本进行复数。所以我的翻译文件有这个,
en:
people:
one: %{count} People
other: %{count} Peoples
问题是,我需要将数字加粗。所以在我看来我有这个,
raw t(.people, count: content_tag(:strong, 4))
由于我包含了一个 content_tag,这是否会使用<strong> 4 </strong> 'count' 一个字符串并将其传递给翻译并始终返回'Peoples'?
或者有没有更好的方法来做到这一点。
谢谢
【问题讨论】:
标签: ruby-on-rails internationalization rails-i18n