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