Skip to content

Instantly share code, notes, and snippets.

@hemalich
Created January 10, 2011 16:43
Show Gist options
  • Select an option

  • Save hemalich/773024 to your computer and use it in GitHub Desktop.

Select an option

Save hemalich/773024 to your computer and use it in GitHub Desktop.
I18n API with Pluralization feature
I18n.backend.store_translations :en, :friend => {
:one => '1 friend',
:other => '%{count} friends'
}
I18n.translate :friend, :count => 2
# => '2 friends'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment