I have got a model, that is called vehicle.
In my translation the model must be: vehicle => Fahrzeug vehicles => Fahrzeuge
I tried to set this in the locales file, but it did not work:
activerecord:
models:
vehicle: Fahrzeug
vehicles: Fahrzeuge
ActiveRecord first translates the model name using I18n.translate with default
:count => 1
Pluralizing this string afterwards dosn't know about model translations.
But, human accepts options so
Vehicle.model_name.human(:count => 2)
does the trick together with pluralized translations:
de:
activerecord:
models:
vehicle:
one: 'Fahrzeug'
other: 'Fahrzeuge'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With