Make API action=tokens extendable
[mediawiki.git] / resources / mediawiki.language / languages / sr.js
blob25cdc8a20d6bca3f1fe492e7ae18c07597777b4a
1 /**
2 * Serbian (Српски / Srpski) language functions
3 */
5 mediaWiki.language.convertPlural = function( count, forms ) {
6 if ( forms.length === 2 ) {
7 return ( count == 1 ) ? forms[0] : forms[1];
9 forms = mediaWiki.language.preConvertPlural( forms, 3 );
10 if ( count > 10 && Math.floor( ( count % 100 ) / 10 ) == 1 ) {
11 return forms[2];
13 switch ( count % 10 ) {
14 case 1:
15 return forms[0];
16 case 2:
17 case 3:
18 case 4:
19 return forms[1];
20 default:
21 return forms[2];