added the getVariant() interface to get a list of supported language variants
[lhc/web/wiklou.git] / languages / Language.php
index 79eb150..dd808d7 100644 (file)
@@ -46,6 +46,10 @@ if($wgMetaNamespace === FALSE)
        NS_CATEGORY_TALK    => 'Category_talk'
 );
 
+if(isset($wgExtraNamespaces)) {
+       $wgNamespaceNamesEn=$wgNamespaceNamesEn+$wgExtraNamespaces;
+}
+
 /* private */ $wgDefaultUserOptionsEn = array(
        'quickbar' => 1, 'underline' => 1, 'hover' => 1,
        'cols' => 80, 'rows' => 25, 'searchlimit' => 20,
@@ -54,7 +58,7 @@ if($wgMetaNamespace === FALSE)
        'highlightbroken' => 1, 'stubthreshold' => 0,
        'previewontop' => 1, 'editsection'=>1,'editsectiononrightclick'=>0, 'showtoc'=>1,
        'showtoolbar' =>1,
-       'date' => 0
+       'date' => 0, 'imagesize' => 2
 );
 
 /* private */ $wgQuickbarSettingsEn = array(
@@ -301,7 +305,7 @@ and the [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User's Guide] f
 'portal'               => 'Community portal',
 'portal-url'           => '{{ns:4}}:Community Portal',
 'about'                        => 'About',
-"aboutwikipedia" => "About {{SITENAME}}",
+"aboutsite"      => "About {{SITENAME}}",
 "aboutpage"            => "{{ns:4}}:About",
 'article' => 'Content page',
 'help'                 => 'Help',
@@ -333,7 +337,7 @@ and the [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User's Guide] f
 "disclaimerpage"               => "{{ns:4}}:General_disclaimer",
 "errorpagetitle" => "Error",
 "returnto"             => "Return to $1.",
-"fromwikipedia"        => "From {{SITENAME}}",
+"tagline"              => "From {{SITENAME}}",
 'whatlinkshere'        => 'Pages that link here',
 'help'                 => 'Help',
 'search'               => 'Search',
@@ -522,6 +526,8 @@ Your account has been created. Don't forget to change your {{SITENAME}} preferen
 'userexists'   => 'The user name you entered is already in use. Please choose a different name.',
 'youremail'            => 'Your email*',
 'yourrealname'         => 'Your real name*',
+'yourlanguage' => 'Interface language',
+'yourvariant'  => 'Language variant',
 'yournick'             => 'Your nickname (for signatures)',
 'emailforlost' => "Fields marked with a star (*) are optional.  Storing an email address enables people to contact you through the website without you having to reveal your
 email address to them, and it can be used to send you a new password if you forget it.<br /><br />Your real name, if you choose to provide it, will be used for giving you attribution for your work.",
@@ -673,7 +679,9 @@ guidelines</a>.",
 Please check the URL you used to access this page.\n",
 'loadhist'             => 'Loading page history',
 'currentrev'   => 'Current revision',
-'revisionasof' => "Revision as of $1",
+'revisionasof'          => 'Revision as of $1',
+'revisionasofwithlink'  => '(Revision as of $1; $2)',
+'currentrevisionlink'   => 'view current revision',
 'cur'                  => 'cur',
 'next'                 => 'next',
 'last'                 => 'last',
@@ -1365,15 +1373,15 @@ title. Please merge them manually.',
 
 'export'               => 'Export pages',
 'exporttext'   => 'You can export the text and editing history of a particular page or
-set of pages wrapped in some XML. In the future, this may then be imported into another 
-wiki running MediaWiki software, although there is no support for this feature in the 
+set of pages wrapped in some XML. In the future, this may then be imported into another
+wiki running MediaWiki software, although there is no support for this feature in the
 current version.
 
-To export article pages, enter the titles in the text box below, one title per line, and 
-select whether you want the current version as well as all old versions, with the page 
+To export article pages, enter the titles in the text box below, one title per line, and
+select whether you want the current version as well as all old versions, with the page
 history lines, or just the current version with the info about the last edit.
 
-In the latter case you can also use a link, e.g. [[{{ns:Special}}:Export/Train]] for the 
+In the latter case you can also use a link, e.g. [[{{ns:Special}}:Export/Train]] for the
 article [[Train]].
 ',
 'exportcuronly'        => 'Include only the current revision, not the full history',
@@ -1529,6 +1537,11 @@ ta[\'ca-nstab-category\'] = new Array(\'c\',\'View the category page\');
 'previousdiff' => '&larr; Go to previous diff',
 'nextdiff' => 'Go to next diff &rarr;',
 
+'imagemaxsize' => 'Limit images on image description pages to: ',
+'showbigimage' => 'Download high resolution version ($1x$2, $3 KB)',
+
+'newimages' => 'New images gallery',
+
 
 );
 
@@ -1692,6 +1705,7 @@ class Language {
        {
                global $wgAmericanDates, $wgUser, $wgUseDynamicDates;
 
+               $ts=wfTimestamp(TS_MW,$ts);
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
                if ( $wgUseDynamicDates ) {
                        if ( $format == MW_DATE_USER_FORMAT ) {
@@ -1720,6 +1734,8 @@ class Language {
 
        function time( $ts, $adj = false, $seconds = false )
        {
+               $ts=wfTimestamp(TS_MW,$ts);
+
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $t = substr( $ts, 8, 2 ) . ':' . substr( $ts, 10, 2 );
@@ -1731,6 +1747,8 @@ class Language {
 
        function timeanddate( $ts, $adj = false, $format = MW_DATE_USER_FORMAT )
        {
+               $ts=wfTimestamp(TS_MW,$ts);
+
                return $this->time( $ts, $adj ) . ', ' . $this->date( $ts, $adj, $format );
        }
 
@@ -1939,10 +1957,21 @@ class Language {
        function convertGrammar( $word, $case ) {
                return $word;
        }
+
+       # Hook for Chinese traditional/simplified conversion
+       function convert( $text ) {
+               return $text;
+       }
+
+    # see if we have a list of language variants for conversion.
+    # right now mainly used in the Chinese conversion
+    function getVariants() {
+        return array();
+    }
 }
 
 # This should fail gracefully if there's not a localization available
-include_once( 'Language' . ucfirst( $wgLanguageCode ) . '.php' );
+@include_once( 'Language' . str_replace( '-', '_', ucfirst( $wgLanguageCode ) ) . '.php' );
 
 }
 ?>