summaryrefslogtreecommitdiff
path: root/languages/classes/LanguageMk.php
blob: 4e3b576ff6f8403f87fec897e0719e2318e8f7a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
 * Macedonian (Македонски)
 *
 * @ingroup Language
 */
class LanguageMk extends Language {
	/**
	 * Plural forms per
	 * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#mk
	 *
	 * @param $count int
	 * @param $forms array
	 *
	 * @return string
	 */
	function convertPlural( $count, $forms ) {
		if ( !count( $forms ) ) { return ''; }
		$forms = $this->preConvertPlural( $forms, 2 );
		// TODO CLDR defines forms[0] for n != 11 and not for n%100 !== 11
		if ( $count % 10 === 1 && $count % 100 !== 11 ) {
			return $forms[0];
		} else {
			return $forms[1];
		}
	}
}