Index: trunk/phase3/languages/LanguageAf.php |
— | — | @@ -7,68 +7,77 @@ |
8 | 8 | |
9 | 9 | require_once( 'LanguageUtf8.php' ); |
10 | 10 | |
11 | | -/* private */ $wgNamespaceNamesAf = array( |
12 | | - NS_MEDIA => "Media", |
13 | | - NS_SPECIAL => "Spesiaal", |
14 | | - NS_MAIN => "", |
15 | | - NS_TALK => "Bespreking", |
16 | | - NS_USER => "Gebruiker", |
17 | | - NS_USER_TALK => "Gebruikerbespreking", |
18 | | - NS_PROJECT => $wgMetaNamespace, |
19 | | - NS_PROJECT_TALK => $wgMetaNamespace."bespreking", |
20 | | - NS_IMAGE => "Beeld", |
21 | | - NS_IMAGE_TALK => "Beeldbespreking", |
22 | | - NS_MEDIAWIKI => "MediaWiki", |
23 | | - NS_MEDIAWIKI_TALK => "MediaWikibespreking", |
24 | | - NS_TEMPLATE => 'Sjabloon', |
25 | | - NS_TEMPLATE_TALK => 'Sjabloonbespreking', |
26 | | - NS_HELP => 'Hulp', |
27 | | - NS_HELP_TALK => 'Hulpbespreking', |
28 | | - NS_CATEGORY => 'Kategorie', |
29 | | - NS_CATEGORY_TALK => 'Kategoriebespreking' |
30 | | -) + $wgNamespaceNamesEn; |
31 | | - |
32 | | -/* private */ $wgQuickbarSettingsAf = array( |
33 | | - "Geen.", "Links vas.", "Regs vas.", "Dryf links." |
34 | | -); |
35 | | - |
36 | | -/* private */ $wgSkinNamesAf = array( |
37 | | - 'standard' => "Standaard", |
38 | | - 'nostalgia' => "Nostalgie", |
39 | | - 'cologneblue' => "Keulen blou", |
40 | | -) + $wgSkinNamesEn; |
41 | | - |
42 | 11 | if (!$wgCachedMessageArrays) { |
43 | 12 | require_once('MessagesAf.php'); |
44 | 13 | } |
45 | 14 | |
46 | | - |
47 | 15 | class LanguageAf extends LanguageUtf8 { |
| 16 | + private $mMessagesAf, $mNamespaceNamesAf = null; |
48 | 17 | |
| 18 | + private $mQuickbarSettingsAf = array( |
| 19 | + "Geen.", "Links vas.", "Regs vas.", "Dryf links." |
| 20 | + ); |
| 21 | + |
| 22 | + private $mSkinNamesAf = array( |
| 23 | + 'standard' => "Standaard", |
| 24 | + 'nostalgia' => "Nostalgie", |
| 25 | + 'cologneblue' => "Keulen blou", |
| 26 | + ); |
| 27 | + |
| 28 | + function LanguageAf() { |
| 29 | + LanguageUtf8::LanguageUtf8(); |
| 30 | + |
| 31 | + global $wgAllMessagesAf; |
| 32 | + $this->mMessagesAf =& $wgAllMessagesAf; |
| 33 | + |
| 34 | + global $wgMetaNamespace; |
| 35 | + $this->mNamespaceNamesAf = array( |
| 36 | + NS_MEDIA => "Media", |
| 37 | + NS_SPECIAL => "Spesiaal", |
| 38 | + NS_MAIN => "", |
| 39 | + NS_TALK => "Bespreking", |
| 40 | + NS_USER => "Gebruiker", |
| 41 | + NS_USER_TALK => "Gebruikerbespreking", |
| 42 | + NS_PROJECT => $wgMetaNamespace, |
| 43 | + NS_PROJECT_TALK => $wgMetaNamespace."bespreking", |
| 44 | + NS_IMAGE => "Beeld", |
| 45 | + NS_IMAGE_TALK => "Beeldbespreking", |
| 46 | + NS_MEDIAWIKI => "MediaWiki", |
| 47 | + NS_MEDIAWIKI_TALK => "MediaWikibespreking", |
| 48 | + NS_TEMPLATE => 'Sjabloon', |
| 49 | + NS_TEMPLATE_TALK => 'Sjabloonbespreking', |
| 50 | + NS_HELP => 'Hulp', |
| 51 | + NS_HELP_TALK => 'Hulpbespreking', |
| 52 | + NS_CATEGORY => 'Kategorie', |
| 53 | + NS_CATEGORY_TALK => 'Kategoriebespreking' |
| 54 | + ); |
| 55 | + |
| 56 | + } |
| 57 | + |
49 | 58 | function getNamespaces() { |
50 | | - global $wgNamespaceNamesAf; |
51 | | - return $wgNamespaceNamesAf; |
| 59 | + return $this->mNamespaceNamesAf + parent::getNamespaces(); |
52 | 60 | } |
53 | 61 | |
54 | 62 | function getQuickbarSettings() { |
55 | | - global $wgQuickbarSettingsAf; |
56 | | - return $wgQuickbarSettingsAf; |
| 63 | + return $this->mQuickbarSettingsAf; |
57 | 64 | } |
58 | 65 | |
59 | 66 | function getSkinNames() { |
60 | | - global $wgSkinNamesAf; |
61 | | - return $wgSkinNamesAf; |
| 67 | + return $this->mSkinNamesAf + parent::getSkinNames(); |
62 | 68 | } |
63 | 69 | |
64 | 70 | function getMessage( $key ) { |
65 | | - global $wgAllMessagesAf; |
66 | | - if( isset( $wgAllMessagesAf[$key] ) ) { |
67 | | - return $wgAllMessagesAf[$key]; |
| 71 | + if( isset( $this->mMessagesAf[$key] ) ) { |
| 72 | + return $this->mMessagesAf[$key]; |
68 | 73 | } else { |
69 | 74 | return parent::getMessage( $key ); |
70 | 75 | } |
71 | 76 | } |
72 | 77 | |
| 78 | + function getAllMessages() { |
| 79 | + return $this->mMessagesAf; |
| 80 | + } |
| 81 | + |
73 | 82 | # South Africa uses space for thousands and comma for decimal |
74 | 83 | # Reference: AWS Reël 7.4 p. 52, 2002 edition |
75 | 84 | # glibc is wrong in this respect in some versions |