mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
extended example
This commit is contained in:
parent
fd6b9f3ce1
commit
d881e2f8e0
1 changed files with 4 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue