-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for ru_RU #68
Comments
Hey Fabien, thanks for taking the initiative. It should be possible to use momentjs's locale file: Time wise is tough for me at the moment. Maybe I find an hour over the weekend but not so sure about it. Maybe somebody else got an hour? |
also, there was already once the try: #56 |
Hi Tino, It is unfortunately not as simple as creating another locale file, as Russian is more complex than most locales. The core code will have to be updated to support accusative / nominative. As mentioned, someone else started adding support for Russian, maybe you could create a Russian branch and accept partial PRs so that we can collaboratively add support? |
in Russian language for plural forms use 3 different endings /** * returns ending for plural form of word by number and array of variants (1, 4, 5) * example variants for apples ['яблоко', 'яблока', 'яблок'] */ function getNumEnding($number, $endingArray) { $number = $number % 100; if ($number >= 11 && $number <= 19) { $ending = $endingArray[2]; } else { $i = $number % 10; switch ($i) { case (1): $ending = $endingArray[0]; break; case (2): case (3): case (4): $ending = $endingArray[1]; break; default: $ending = $endingArray[2]; } } return $ending; } and for ru_RU.php "relativeTime" => array( //... "dd" => function ($number) { // return "%d дней"; - not correct return getNumEnding($number, array("%d день", "%d дня", "%d дней")); }, //... ), |
Thanks @kosha-industry. Implemented the fix in the last release: 28c3765 |
@fightbulc Nice job, but add for others: mm: ['%d минуту', '%d минуты', '%d минут'] hh: ['%d час', '%d часа', '%d часов'] MM: ['%d месяц', '%d месяца', '%d месяцев'] yy: ['%d год', '%d года', '%d лет'] |
up and live |
Ordinal suffixes are still not exactly correct. For the format "jS F Y", which produces "5th December 2016" in English, Russian gives "5ый декабря 2016". "5ый" uses masculine suffix "ый", while months names in Russian have neuter grammatical gender and all numbers should use the same suffux "е" - such as "1е декабря", "5е декабря", "12е июля". |
@astax-t would be great if you could improve it |
@fabienwarniez fixed in #112 |
I want to use this bundle for my project, but I need support for Russian.
I am currently investigating adding support for that locale.
Is anyone else interested in helping?
The text was updated successfully, but these errors were encountered: