MediaWiki  REL1_19
LanguageGa.php
Go to the documentation of this file.
00001 <?php
00002 
00007 class LanguageGa extends Language {
00008 
00017         function convertGrammar( $word, $case ) {
00018                 global $wgGrammarForms;
00019                 if ( isset( $wgGrammarForms['ga'][$case][$word] ) ) {
00020                         return $wgGrammarForms['ga'][$case][$word];
00021                 }
00022 
00023                 switch ( $case ) {
00024                 case 'ainmlae':
00025                         switch ( $word ) {
00026                         case 'an Domhnach':
00027                                 $word = 'Dé Domhnaigh'; break;
00028                         case 'an Luan':
00029                                 $word = 'Dé Luain'; break;
00030                         case 'an Mháirt':
00031                                 $word = 'Dé Mháirt'; break;
00032                         case 'an Chéadaoin':
00033                                 $word = 'Dé Chéadaoin'; break;
00034                         case 'an Déardaoin':
00035                                 $word = 'Déardaoin'; break;
00036                         case 'an Aoine':
00037                                 $word = 'Dé hAoine'; break;
00038                         case 'an Satharn':
00039                                 $word = 'Dé Sathairn'; break;
00040                         }
00041                 }
00042                 return $word;
00043         }
00044 
00050         function convertPlural( $count, $forms ) {
00051                 if ( !count( $forms ) ) { return ''; }
00052 
00053                 // plural forms per http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#ga
00054                 $forms = $this->preConvertPlural( $forms, 3 );
00055 
00056                 if ( $count == 1 ) {
00057                         $index = 0;
00058                 } elseif ( $count == 2 ) {
00059                         $index = 1;
00060                 } else {
00061                         $index = 2;
00062                 }
00063                 return $forms[$index];
00064         }
00065 }