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...)
20 * $wordform4 - plural form for messages without number
23 function convertPlural( $count, $forms ) {
24 if ( !count($forms) ) { return ''; }
25 $forms = $this->preConvertPlural( $forms, 3 );
27 $count = abs( $count );
28 if ( isset($forms[3]) && $count != 1 )
31 if ($count > 10 && floor(($count %
100) / 10) == 1) {
34 switch ($count %
10) {
35 case 1: return $forms[0];
38 case 4: return $forms[1];
39 default: return $forms[2];
44 # Convert from the nominative form of a noun to some other case
45 # Invoked with {{GRAMMAR:case|word}}
47 * Cases: родны, вінавальны, месны
49 function convertGrammar( $word, $case ) {
51 case 'родны': # genitive
52 if ( $word == 'Вікіпэдыя' ) {
54 } elseif ( $word == 'ВікіСлоўнік' ) {
55 $word = 'ВікіСлоўніка';
56 } elseif ( $word == 'ВікіКнігі' ) {
58 } elseif ( $word == 'ВікіКрыніца' ) {
59 $word = 'ВікіКрыніцы';
60 } elseif ( $word == 'ВікіНавіны' ) {
62 } elseif ( $word == 'ВікіВіды' ) {
66 case 'вінавальны': # akusative
67 if ( $word == 'Вікіпэдыя' ) {
69 } elseif ( $word == 'ВікіСлоўнік' ) {
70 $word = 'ВікіСлоўнік';
71 } elseif ( $word == 'ВікіКнігі' ) {
73 } elseif ( $word == 'ВікіКрыніца' ) {
74 $word = 'ВікіКрыніцу';
75 } elseif ( $word == 'ВікіНавіны' ) {
77 } elseif ( $word == 'ВікіВіды' ) {
81 case 'месны': # prepositional
82 if ( $word == 'Вікіпэдыя' ) {
84 } elseif ( $word == 'ВікіСлоўнік' ) {
85 $word = 'ВікіСлоўніку';
86 } elseif ( $word == 'ВікіКнігі' ) {
88 } elseif ( $word == 'ВікіКрыніца' ) {
89 $word = 'ВікіКрыніцы';
90 } elseif ( $word == 'ВікіНавіны' ) {
91 $word = 'ВікіНавінах';
92 } elseif ( $word == 'ВікіВіды' ) {
98 return $word; # this will return the original value for 'назоўны' (nominative) and all undefined case values