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