Rails: Getting a Pluralize-able Translation Without a Count -
i have model translation can pluralized:
en: activerecord: models: user: one: user other: users
if call translation directly, these results:
t("activerecord.models.user", count: 1) => user t("activerecord.models.user", count: 2) => users t("activerecord.models.user") => {:one=>"user", :other=>"users"}
is there way last translation default "user"?
if going pass count , other times not, should set separate keys them:
counted_user: one: user other: users user: user t("activerecord.models.counted_user", count: 1) t("activerecord.models.counted_user", count: 2) t("activerecord.models.user")
if default used in minimal circumstances don't warrant separate key, call directly:
t("activerecord.models.user.one")
Comments
Post a Comment