2 * Finnish (Suomi) language functions
3 * @author Santhosh Thottingal
6 mediaWiki.language.convertGrammar = function( word, form ) {
7 var grammarForms = mw.language.getData( 'fi', 'grammarForms' );
8 if ( grammarForms && grammarForms[form] ) {
9 return grammarForms[form][word] ;
13 var aou = word.match( /[aou][^äöy]*$/i );
15 if ( word.match( /wiki$/i ) ) {
18 //append i after final consonant
19 if ( word.match( /[bcdfghjklmnpqrstvwxz]$/i ) )
27 word += ( aou ? 'sta' : 'stä' );
30 word += ( aou ? 'a' : 'ä' );
33 // Double the last letter and add 'n'
34 word += word.substr( word.length-1 ) + 'n';
37 word += ( aou ? 'ssa' : 'ssä' );