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