2 /** Belarusian in Taraškievica orthography (Беларуская тарашкевіца)
6 * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
8 * @link http://be.wikipedia.org/wiki/Talk:LanguageBe.php
9 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
10 * @license http://www.gnu.org/copyleft/fdl.html GNU Free Documentation License
13 class LanguageBe_tarask
extends Language
{
15 * Plural form transformations
17 * $wordform1 - singular form (for 1, 21, 31, 41...)
18 * $wordform2 - plural form (for 2, 3, 4, 22, 23, 24, 32, 33, 34...)
19 * $wordform3 - plural form (for 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26...)
22 function convertPlural( $count, $forms ) {
23 if ( !count($forms) ) { return ''; }
25 //if no number with word, then use $form[0] for singular and $form[1] for plural or zero
26 if( count($forms) === 2 ) return $count == 1 ?
$forms[0] : $forms[1];
28 $forms = $this->preConvertPlural( $forms, 3 );
30 if ($count > 10 && floor(($count %
100) / 10) == 1) {
33 switch ($count %
10) {
34 case 1: return $forms[0];
37 case 4: return $forms[1];
38 default: return $forms[2];
43 # Convert from the nominative form of a noun to some other case
44 # Invoked with {{GRAMMAR:case|word}}
46 * Cases: родны, вінавальны, месны
48 function convertGrammar( $word, $case ) {
50 case 'родны': # genitive
51 if ( $word == 'Вікіпэдыя' ) {
53 } elseif ( $word == 'ВікіСлоўнік' ) {
54 $word = 'ВікіСлоўніка';
55 } elseif ( $word == 'ВікіКнігі' ) {
57 } elseif ( $word == 'ВікіКрыніца' ) {
58 $word = 'ВікіКрыніцы';
59 } elseif ( $word == 'ВікіНавіны' ) {
61 } elseif ( $word == 'ВікіВіды' ) {
65 case 'вінавальны': # akusative
66 if ( $word == 'Вікіпэдыя' ) {
68 } elseif ( $word == 'ВікіСлоўнік' ) {
69 $word = 'ВікіСлоўнік';
70 } elseif ( $word == 'ВікіКнігі' ) {
72 } elseif ( $word == 'ВікіКрыніца' ) {
73 $word = 'ВікіКрыніцу';
74 } elseif ( $word == 'ВікіНавіны' ) {
76 } elseif ( $word == 'ВікіВіды' ) {
80 case 'месны': # prepositional
81 if ( $word == 'Вікіпэдыя' ) {
83 } elseif ( $word == 'ВікіСлоўнік' ) {
84 $word = 'ВікіСлоўніку';
85 } elseif ( $word == 'ВікіКнігі' ) {
87 } elseif ( $word == 'ВікіКрыніца' ) {
88 $word = 'ВікіКрыніцы';
89 } elseif ( $word == 'ВікіНавіны' ) {
90 $word = 'ВікіНавінах';
91 } elseif ( $word == 'ВікіВіды' ) {
97 return $word; # this will return the original value for 'назоўны' (nominative) and all undefined case values