http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88303

Revision: 88303
Author:   catrope
Date:     2011-05-17 13:21:08 +0000 (Tue, 17 May 2011)
Log Message:
-----------
1.17wmf1: Port Language::isValidBuiltInCode() from trunk for CLDR's benefit

Modified Paths:
--------------
    branches/wmf/1.17wmf1/languages/Language.php

Modified: branches/wmf/1.17wmf1/languages/Language.php
===================================================================
--- branches/wmf/1.17wmf1/languages/Language.php        2011-05-17 13:15:57 UTC 
(rev 88302)
+++ branches/wmf/1.17wmf1/languages/Language.php        2011-05-17 13:21:08 UTC 
(rev 88303)
@@ -196,6 +196,14 @@
        }
 
        /**
+        * Returns true if a language code is of a valid form for the purposes 
of 
+        * internal customisation of MediaWiki, via Messages*.php.
+        */
+       public static function isValidBuiltInCode( $code ) {
+               return preg_match( '/^[a-z0-9-]*$/i', $code );
+       }       
+
+       /**
         * Get the LocalisationCache instance
         */
        public static function getLocalisationCache() {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to