Index: trunk/phase3/languages/LanguageTlh.php |
— | — | @@ -0,0 +1,56 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +# Hooray for Klingon, the most controversial language addition to date |
| 5 | + |
| 6 | +require_once( "LanguageUtf8.php" ); |
| 7 | + |
| 8 | +if ( $wgMetaNamespace == "Wikipedia" ) { |
| 9 | + $wgMetaNamespace = "wIqIpe'DIya"; |
| 10 | +} |
| 11 | + |
| 12 | +/* private */ $wgNamespaceNamesTlh = array( |
| 13 | + NS_MEDIA => "Doch", |
| 14 | + NS_SPECIAL => "le'", |
| 15 | + NS_MAIN => "", |
| 16 | + NS_TALK => "ja'chuq", |
| 17 | + NS_USER => "lo'wI'", |
| 18 | + NS_USER_TALK => "lo'wI'_ja'chuq", |
| 19 | + NS_WIKIPEDIA => $wgMetaNamespace, |
| 20 | + NS_WIKIPEDIA_TALK => $wgMetaNamespace . "_ja'chuq", |
| 21 | + NS_IMAGE => "nagh_beQ", |
| 22 | + NS_IMAGE_TALK => "nagh_beQ_ja'chuq", |
| 23 | + NS_MEDIAWIKI => "MediaWiki", |
| 24 | + NS_MEDIAWIKI_TALK => "MediaWiki_ja'chuq", |
| 25 | + NS_TEMPLATE => "chen'ay'", |
| 26 | + NS_TEMPLATE_TALK => "chen'ay'_ja'chuq", |
| 27 | + NS_HELP => "QaH", |
| 28 | + NS_HELP_TALK => "QaH_ja'chuq", |
| 29 | + NS_CATEGORY => "Segh", |
| 30 | + NS_CATEGORY_TALK => "Segh_ja'chuq" |
| 31 | +); |
| 32 | + |
| 33 | +class LanguageTlh extends LanguageUtf8 |
| 34 | +{ |
| 35 | + function getNamespaces() { |
| 36 | + global $wgNamespaceNamesTlh; |
| 37 | + return $wgNamespaceNamesTlh; |
| 38 | + } |
| 39 | + |
| 40 | + function getNsText( $index ) { |
| 41 | + global $wgNamespaceNamesTlh; |
| 42 | + return $wgNamespaceNamesTlh[$index]; |
| 43 | + } |
| 44 | + |
| 45 | + function getNsIndex( $text ) { |
| 46 | + global $wgNamespaceNamesTlh; |
| 47 | + |
| 48 | + foreach ( $wgNamespaceNamesTlh as $i => $n ) { |
| 49 | + if ( 0 == strcasecmp( $n, $text ) ) { return $i; } |
| 50 | + } |
| 51 | + return false; |
| 52 | + } |
| 53 | +} |
| 54 | + |
| 55 | +?> |
| 56 | + |
| 57 | + |
Property changes on: trunk/phase3/languages/LanguageTlh.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 58 | + native |
Added: svn:keywords |
2 | 59 | + Author Date Id Revision |