I18n for model-specific Rails submit button

Those labels can be customized using I18n under the +helpers.submit+ key and using %{model} for translation interpolation: en: helpers: submit: create: “Create a %{model}” update: “Confirm changes to %{model}” It also searches for a key specific to the given object: en: helpers: submit: post: create: “Add %{model}” Source @ actionview/lib/action_view/helpers/form_helper.rb

i18n Pluralization

Try this: en.yml : en: misc: kids: zero: no kids one: 1 kid other: %{count} kids In a view: You have <%= t(‘misc.kids’, :count => 4) %> Updated answer for languages with multiple pluralization (tested with Rails 3.0.7): File config/initializers/pluralization.rb: require “i18n/backend/pluralization” I18n::Backend::Simple.send(:include, I18n::Backend::Pluralization) File config/locales/plurals.rb: {:ru => { :i18n => { :plural => { … Read more

Rails I18n validation deprecation warning

Important: Make sure your app is not using I18n 0.6.8, it has a bug that prevents the configuration to be set correctly. Short answer In order to silence the warning edit the application.rb file and include the following line inside the Rails::Application body config.i18n.enforce_available_locales = true The possible values are: false: if you want to … Read more