Move mbstring initializaton to Setup.php, add checks
[lhc/web/wiklou.git] / languages / Language.php
index e7643b1..f0c7d76 100644 (file)
@@ -30,8 +30,6 @@ if ( !defined( 'MEDIAWIKI' ) ) {
        exit( 1 );
 }
 
-mb_internal_encoding( 'UTF-8' );
-
 use CLDRPluralRuleParser\Evaluator;
 
 /**
@@ -4190,6 +4188,17 @@ class Language {
                return $lang;
        }
 
+       /**
+        * Compare with an other language object
+        *
+        * @since 1.28
+        * @param Language $lang
+        * @return boolean
+        */
+       public function equals( Language $lang ) {
+               return $lang->getCode() === $this->mCode;
+       }
+
        /**
         * Get the internal language code for this language object
         *