summaryrefslogtreecommitdiff
path: root/languages/classes/LanguageSma.php
blob: a04c77da2cc980e05403fb75bdcdffc47bbcea44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
 * Southern Sami (Åarjelsaemien)
 *
 * @ingroup Language
 */
class LanguageSma extends Language {
	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 ) {
			$index = 1;
		} elseif ( $count == 2 ) {
			$index = 2;
		} else {
			$index = 3;
		}
		return $forms[$index];
	}
}