2009-10-02 18:30:23 +00:00
|
|
|
<?php
|
|
|
|
|
/**
|
2010-10-10 12:53:37 +00:00
|
|
|
* Northern Sami (Sámegiella)
|
2009-10-02 18:30:23 +00:00
|
|
|
*
|
|
|
|
|
* @ingroup Language
|
|
|
|
|
*/
|
|
|
|
|
class LanguageSe extends Language {
|
2011-05-29 15:21:03 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param $count int
|
|
|
|
|
* @param $forms array
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
2009-10-02 18:30:23 +00:00
|
|
|
function convertPlural( $count, $forms ) {
|
2010-07-29 09:43:18 +00:00
|
|
|
if ( !count( $forms ) ) { return ''; }
|
2009-10-02 18:30:23 +00:00
|
|
|
|
|
|
|
|
// plural forms per http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#se
|
|
|
|
|
$forms = $this->preConvertPlural( $forms, 3 );
|
|
|
|
|
|
|
|
|
|
if ( $count == 1 ) {
|
2010-06-13 20:23:53 +00:00
|
|
|
$index = 0;
|
2010-07-29 09:43:18 +00:00
|
|
|
} elseif ( $count == 2 ) {
|
2010-06-13 20:23:53 +00:00
|
|
|
$index = 1;
|
2009-10-02 18:30:23 +00:00
|
|
|
} else {
|
2010-06-13 20:23:53 +00:00
|
|
|
$index = 2;
|
2009-10-02 18:30:23 +00:00
|
|
|
}
|
|
|
|
|
return $forms[$index];
|
|
|
|
|
}
|
|
|
|
|
}
|