Added translations for the remaining EXIF messages.
[lhc/web/wiklou.git] / languages / classes / LanguageBe.php
1 <?php
2 /** Belarusian normative (Беларуская мова)
3 *
4 * This is still the version from Be-x-old, only duplicated for consistency of
5 * plural and grammar functions. If there are errors please send a patch.
6 *
7 * @addtogroup Language
8 *
9 * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
10 * @bug 1638, 2135
11 * @link http://be.wikipedia.org/wiki/Talk:LanguageBe.php
12 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
13 * @license http://www.gnu.org/copyleft/fdl.html GNU Free Documentation License
14 */
15
16 class LanguageBe extends Language {
17
18 function convertPlural( $count, $forms ) {
19 if ( !count($forms) ) { return ''; }
20 $forms = $this->preConvertPlural( $forms, 3 );
21
22 if ($count > 10 && floor(($count % 100) / 10) == 1) {
23 return $forms[2];
24 } else {
25 switch ($count % 10) {
26 case 1: return $forms[0];
27 case 2:
28 case 3:
29 case 4: return $forms[1];
30 default: return $forms[2];
31 }
32 }
33 }
34
35 # Convert from the nominative form of a noun to some other case
36 # Invoked with {{GRAMMAR:case|word}}
37 /**
38 * Cases: родны, вінавальны, месны
39 */
40 function convertGrammar( $word, $case ) {
41 switch ( $case ) {
42 case 'родны': # genitive
43 if ( $word == 'Вікіпэдыя' ) {
44 $word = 'Вікіпэдыі';
45 } elseif ( $word == 'ВікіСлоўнік' ) {
46 $word = 'ВікіСлоўніка';
47 } elseif ( $word == 'ВікіКнігі' ) {
48 $word = 'ВікіКніг';
49 } elseif ( $word == 'ВікіКрыніца' ) {
50 $word = 'ВікіКрыніцы';
51 } elseif ( $word == 'ВікіНавіны' ) {
52 $word = 'ВікіНавін';
53 } elseif ( $word == 'ВікіВіды' ) {
54 $word = 'ВікіВідаў';
55 }
56 break;
57 case 'вінавальны': # akusative
58 if ( $word == 'Вікіпэдыя' ) {
59 $word = 'Вікіпэдыю';
60 } elseif ( $word == 'ВікіСлоўнік' ) {
61 $word = 'ВікіСлоўнік';
62 } elseif ( $word == 'ВікіКнігі' ) {
63 $word = 'ВікіКнігі';
64 } elseif ( $word == 'ВікіКрыніца' ) {
65 $word = 'ВікіКрыніцу';
66 } elseif ( $word == 'ВікіНавіны' ) {
67 $word = 'ВікіНавіны';
68 } elseif ( $word == 'ВікіВіды' ) {
69 $word = 'ВікіВіды';
70 }
71 break;
72 case 'месны': # prepositional
73 if ( $word == 'Вікіпэдыя' ) {
74 $word = 'Вікіпэдыі';
75 } elseif ( $word == 'ВікіСлоўнік' ) {
76 $word = 'ВікіСлоўніку';
77 } elseif ( $word == 'ВікіКнігі' ) {
78 $word = 'ВікіКнігах';
79 } elseif ( $word == 'ВікіКрыніца' ) {
80 $word = 'ВікіКрыніцы';
81 } elseif ( $word == 'ВікіНавіны' ) {
82 $word = 'ВікіНавінах';
83 } elseif ( $word == 'ВікіВіды' ) {
84 $word = 'ВікіВідах';
85 }
86 break;
87 }
88
89 return $word; # this will return the original value for 'назоўны' (nominative) and all undefined case values
90 }
91
92 }
93
94