Follow-up r68324: Fix syntax error
[lhc/web/wiklou.git] / languages / classes / LanguageGd.php
1 <?php
2 /** Scots Gaelic (GĂ idhlig)
3 *
4 * @ingroup Language
5 *
6 * @author Raimond Spekking
7 */
8 class LanguageGd extends Language {
9
10 /**
11 * Plural form transformations
12 * Based on this discussion: http://translatewiki.net/w/i.php?title=Portal_talk:Gd&oldid=1094065#%C3%80ireamhan
13 *
14 * $forms[0] - singular form (for 1)
15 * $forms[1] - dual form (for 2)
16 * $forms[2] - plural form 1 (for 3-10)
17 * $forms[3] - plural form 2 (for >= 11)
18 *
19 */
20 function convertPlural( $count, $forms ) {
21 if ( !count($forms) ) { return ''; }
22 $forms = $this->preConvertPlural( $forms, 4 );
23
24 $count = abs( $count );
25 if ( $count === 1 ) {
26 return $forms[0];
27 } elseif ( $count === 2 ) {
28 return $forms[1];
29 } elseif ( $count >= 3 && $count <= 10 ) {
30 return $forms[2];
31 } else {
32 return $forms[3];
33 }
34 }
35 }