formatjs / handlebars-intl

Handlebars helpers for internationalization.
http://formatjs.io/handlebars/
Other
265 stars 28 forks source link

Issue with a plural in 'ru' locale #74

Closed mxkh closed 5 years ago

mxkh commented 8 years ago

Hi,

i have an issue with plural in ru locale, example:

Здесь {n,plural,=0{котов нет} =1{есть один кот} one{# кот} few{# кота} many{# котов} other{# кота}}!

if n = 101, should work 'one' and result must be a '101 кот', but work 'other' and result is '101 кота'

I check it on PHP Yii2 Framework, and it's work perfect for 'ru' locale

And i found some helpful links (http://www.yiiframework.com/doc-2.0/guide-tutorial-i18n.html#plural) (http://intl.rmcreative.ru/tables?locale=ru) (http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ru)

Can you help me please ?

P.S. I'm sorry for my awful english :(

ericf commented 8 years ago

It's likely that you need to load the ru locale data on the page, otherwise it will be falling back to English's pluralization rules where 101 will being other.