summaryrefslogtreecommitdiff
path: root/languages/classes/LanguageCs.php
blob: 935aed4e97d6e2a4800eedb911db323407d71d12 (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
28
29
<?php

/** Czech (čeština [subst.], český [adj.], česky [adv.])
 *
 * @ingroup Language
 */
class LanguageCs extends Language {

	# Plural transformations
	# Invoked by putting
	#   {{plural:count|form1|form2-4|form0,5+}} for two forms plurals
	#   {{plural:count|form1|form0,2+}} for single form plurals
	# in a message
	function convertPlural( $count, $forms ) {
		if ( !count( $forms ) ) { return ''; }
		$forms = $this->preConvertPlural( $forms, 3 );

		switch ( $count ) {
			case 1:
				return $forms[0];
			case 2:
			case 3:
			case 4:
				return $forms[1];
			default:
				return $forms[2];
		}
	}
}