aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorcnaize <cnaize@gmail.com>2012-09-07 10:34:05 +0400
committercnaize <cnaize@gmail.com>2012-09-07 10:34:05 +0400
commitd881e2f8e041e75d37e27505d28314af64714fb8 (patch)
treee553d748391543dd26b9e0264d5b690cbd1bdd65 /guides
parentfd6b9f3ce17a0223ce09d0e0b8da3ed8e9c8b235 (diff)
downloadrails-d881e2f8e041e75d37e27505d28314af64714fb8.tar.gz
rails-d881e2f8e041e75d37e27505d28314af64714fb8.tar.bz2
rails-d881e2f8e041e75d37e27505d28314af64714fb8.zip
extended example
Diffstat (limited to 'guides')
-rw-r--r--guides/source/i18n.textile5
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: