2 * Armenian (Հայերեն) language functions
5 mediaWiki.language.convertPlural = function( count, forms ) {
6 forms = mediaWiki.language.preConvertPlural( forms, 2 );
7 return ( Math.abs( count ) <= 1 ) ? forms[0] : forms[1];
10 mediaWiki.language.convertGrammar = function( word, form ) {
11 var grammarForms = mw.language.getData( 'hy', 'grammarForms' );
12 if ( grammarForms && grammarForms[form] ) {
13 return grammarForms[form][word] ;
16 // These rules are not perfect, but they are currently only used for site names so it doesn't
17 // matter if they are wrong sometimes. Just add a special case for your site name if necessary.
20 case 'genitive': // սեռական հոլով
21 if ( word.substr( -1 ) === 'ա' )
22 word = word.substr( 0, word.length -1 ) + 'այի';
23 else if ( word.substr( -1 ) === 'ո' )
24 word = word.substr( 0, word.length - 1 ) + 'ոյի';
25 else if ( word.substr( -4 ) === 'գիրք' )
26 word = word.substr( 0, word.length - 4 ) + 'գրքի';