exit( 1 );
}
-# Read language names
-global $wgLanguageNames;
-require_once __DIR__ . '/Names.php';
-
if ( function_exists( 'mb_strtoupper' ) ) {
mb_internal_encoding( 'UTF-8' );
}
// Check if there is a language class for the code
$class = self::classFromCode( $code );
self::preloadLanguageClass( $class );
- if ( MWInit::classExists( $class ) ) {
+ if ( class_exists( $class ) ) {
$lang = new $class;
return $lang;
}
$class = self::classFromCode( $fallbackCode );
self::preloadLanguageClass( $class );
- if ( MWInit::classExists( $class ) ) {
+ if ( class_exists( $class ) ) {
$lang = Language::newFromCode( $fallbackCode );
$lang->setCode( $code );
return $lang;
}
if ( $coreLanguageNames === null ) {
- include MWInit::compiledPath( 'languages/Names.php' );
+ global $IP;
+ include "$IP/languages/Names.php";
}
if ( isset( $coreLanguageNames[$tag] )
static $coreLanguageNames;
if ( $coreLanguageNames === null ) {
- include MWInit::compiledPath( 'languages/Names.php' );
+ global $IP;
+ include "$IP/languages/Names.php";
}
$names = array();
// Timestamp within the past week: show the day of the week and time
$format = $this->getDateFormatString( 'time', $user->getDatePreference() ?: 'default' );
$weekday = self::$mWeekdayMsgs[$ts->timestamp->format( 'w' )];
+ // Messages:
+ // sunday-at, monday-at, tuesday-at, wednesday-at, thursday-at, friday-at, saturday-at
$ts = wfMessage( "$weekday-at" )
->inLanguage( $this )
->params( $this->sprintfDate( $format, $ts->getTimestamp( TS_MW ) ) )
*/
function checkTitleEncoding( $s ) {
if ( is_array( $s ) ) {
- wfDebugDieBacktrace( 'Given array to checkTitleEncoding.' );
+ throw new MWException( 'Given array to checkTitleEncoding.' );
}
if ( StringUtils::isUtf8( $s ) ) {
return $s;
* Normally we output all numbers in plain en_US style, that is
* 293,291.235 for twohundredninetythreethousand-twohundredninetyone
* point twohundredthirtyfive. However this is not suitable for all
- * languages, some such as Pakaran want ੨੯੩,੨੯੫.੨੩੫ and others such as
+ * languages, some such as Punjabi want ੨੯੩,੨੯੫.੨੩੫ and others such as
* Icelandic just want to use commas instead of dots, and dots instead
* of commas like "293.291,235".
*
return self::$dataCache->getItem( $this->mCode, 'linkTrail' );
}
+ /**
+ * A regular expression character set to match legal word-prefixing
+ * characters which should be merged onto a link of the form foo[[bar]].
+ *
+ * @return string
+ */
+ public function linkPrefixCharset() {
+ return self::$dataCache->getItem( $this->mCode, 'linkPrefixCharset' );
+ }
+
/**
* @return Language
*/