2 * Russian (Русский) language functions
8 $.i18n
.languages
.ru
= $.extend( {}, $.i18n
.languages
['default'], {
9 convertGrammar: function ( word
, form
) {
10 if ( form
=== 'genitive' ) { // родительный падеж
11 if ( word
.substr( -1 ) === 'ь' ) {
12 word
= word
.substr( 0, word
.length
- 1 ) + 'я';
13 } else if ( word
.substr( -2 ) === 'ия' ) {
14 word
= word
.substr( 0, word
.length
- 2 ) + 'ии';
15 } else if ( word
.substr( -2 ) === 'ка' ) {
16 word
= word
.substr( 0, word
.length
- 2 ) + 'ки';
17 } else if ( word
.substr( -2 ) === 'ти' ) {
18 word
= word
.substr( 0, word
.length
- 2 ) + 'тей';
19 } else if ( word
.substr( -2 ) === 'ды' ) {
20 word
= word
.substr( 0, word
.length
- 2 ) + 'дов';
21 } else if ( word
.substr( -3 ) === 'ник' ) {
22 word
= word
.substr( 0, word
.length
- 3 ) + 'ника';