wiki.techinc.nl/languages/classes/LanguageSma.php

30 lines
574 B
PHP
Raw Normal View History

<?php
/**
2010-10-10 12:53:37 +00:00
* Southern Sami (Åarjelsaemien)
*
* @ingroup Language
*/
class LanguageSma extends Language {
2011-05-29 15:21:03 +00:00
/**
* @param $count int
* @param $forms array
* @return string
*/
function convertPlural( $count, $forms ) {
if ( !count( $forms ) ) { return ''; }
// plural forms per http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#sma
$forms = $this->preConvertPlural( $forms, 3 );
if ( $count == 1 ) {
2011-07-16 11:40:28 +00:00
$index = 0;
} elseif ( $count == 2 ) {
2011-07-16 11:40:28 +00:00
$index = 1;
} else {
2011-07-16 11:40:28 +00:00
$index = 2;
}
return $forms[$index];
}
}