diff options
-rw-r--r-- | guides/source/i18n.textile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/guides/source/i18n.textile b/guides/source/i18n.textile index 67863e590c..c073a146a8 100644 --- a/guides/source/i18n.textile +++ b/guides/source/i18n.textile @@ -575,11 +575,14 @@ The +:count+ interpolation variable has a special role in that it both is interp <ruby> I18n.backend.store_translations :en, :inbox => { - :one => '1 message', + :one => 'one message', :other => '%{count} messages' } I18n.translate :inbox, :count => 2 # => '2 messages' + +I18n.translate :inbox, :count => 1 +# => 'one message' </ruby> The algorithm for pluralizations in +:en+ is as simple as: |