BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
Language Class Reference
Inheritance diagram for Language:

Public Member Functions

 __destruct ()
 
 initContLang ()
 
 getFallbackLanguages ()
 
 getBookstoreList ()
 
 getNamespaces ()
 
 setNamespaces (array $namespaces)
 
 resetNamespaces ()
 
 getFormattedNamespaces ()
 
 getNsText ($index)
 
 getFormattedNsText ($index)
 
 getGenderNsText ($index, $gender)
 
 needsGenderDistinction ()
 
 getLocalNsIndex ($text)
 
 getNamespaceAliases ()
 
 getNamespaceIds ()
 
 getNsIndex ($text)
 
 getVariantname ($code, $usemsg=true)
 
 getDatePreferences ()
 
 getDateFormats ()
 
 getDefaultDateFormat ()
 
 getDatePreferenceMigrationMap ()
 
 getImageFile ($image)
 
 getImageFiles ()
 
 getExtraUserToggles ()
 
 getUserToggle ($tog)
 
 getMessageFromDB ($msg)
 
 getMonthName ($key)
 
 getMonthNamesArray ()
 
 getMonthNameGen ($key)
 
 getMonthAbbreviation ($key)
 
 getMonthAbbreviationsArray ()
 
 getWeekdayName ($key)
 
 getWeekdayAbbreviation ($key)
 
 getIranianCalendarMonthName ($key)
 
 getHebrewCalendarMonthName ($key)
 
 getHebrewCalendarMonthNameGen ($key)
 
 getHijriCalendarMonthName ($key)
 
 sprintfDate ($format, $ts, DateTimeZone $zone=null, &$ttl= 'unused')
 
 userAdjust ($ts, $tz=false)
 
 dateFormat ($usePrefs=true)
 
 getDateFormatString ($type, $pref)
 
 date ($ts, $adj=false, $format=true, $timecorrection=false)
 
 time ($ts, $adj=false, $format=true, $timecorrection=false)
 
 timeanddate ($ts, $adj=false, $format=true, $timecorrection=false)
 
 formatDuration ($seconds, array $chosenIntervals=[])
 
 getDurationIntervals ($seconds, array $chosenIntervals=[])
 
 userDate ($ts, User $user, array $options=[])
 
 userTime ($ts, User $user, array $options=[])
 
 userTimeAndDate ($ts, User $user, array $options=[])
 
 getHumanTimestamp (MWTimestamp $time, MWTimestamp $relativeTo=null, User $user=null)
 
 getMessage ($key)
 
 getAllMessages ()
 
 iconv ($in, $out, $string)
 
 ucwordbreaksCallbackAscii ($matches)
 
 ucwordbreaksCallbackMB ($matches)
 
 ucwordsCallbackMB ($matches)
 
 ucfirst ($str)
 
 uc ($str, $first=false)
 
 lcfirst ($str)
 
 lc ($str, $first=false)
 
 isMultibyte ($str)
 
 ucwords ($str)
 
 ucwordbreaks ($str)
 
 caseFold ($s)
 
 checkTitleEncoding ($s)
 
 fallback8bitEncoding ()
 
 hasWordBreaks ()
 
 segmentByWord ($string)
 
 normalizeForSearch ($string)
 
 convertForSearchResult ($termsArray)
 
 firstChar ($s)
 
 initEncoding ()
 
 recodeForEdit ($s)
 
 recodeInput ($s)
 
 normalize ($s)
 
 transformUsingPairFile ($file, $string)
 
 isRTL ()
 
 getDir ()
 
 alignStart ()
 
 alignEnd ()
 
 getDirMarkEntity ($opposite=false)
 
 getDirMark ($opposite=false)
 
 capitalizeAllNouns ()
 
 getArrow ($direction= 'forwards')
 
 linkPrefixExtension ()
 
 getMagicWords ()
 
 getMagic ($mw)
 
 addMagicWordsByLang ($newWords)
 
 getSpecialPageAliases ()
 
 emphasize ($text)
 
 formatNum ($number, $nocommafy=false)
 
 formatNumNoSeparators ($number)
 
 parseFormattedNumber ($number)
 
 commafy ($number)
 
 digitGroupingPattern ()
 
 digitTransformTable ()
 
 separatorTransformTable ()
 
 minimumGroupingDigits ()
 
 listToText (array $l)
 
 commaList (array $list)
 
 semicolonList (array $list)
 
 pipeList (array $list)
 
 truncate ($string, $length, $ellipsis= '...', $adjustLength=true)
 
 truncateForDatabase ($string, $length, $ellipsis= '...', $adjustLength=true)
 
 truncateForVisual ($string, $length, $ellipsis= '...', $adjustLength=true)
 
 truncateHtml ($text, $length, $ellipsis= '...')
 
 convertGrammar ($word, $case)
 
 getGrammarForms ()
 
 getGrammarTransformations ()
 
 gender ($gender, $forms)
 
 convertPlural ($count, $forms)
 
 embedBidi ($text= '')
 
 translateBlockExpiry ($str, User $user=null, $now=0)
 
 segmentForDiff ($text)
 
 unsegmentForDiff ($text)
 
 getConverter ()
 
 autoConvert ($text, $variant=false)
 
 autoConvertToAllVariants ($text)
 
 convert ($text)
 
 convertTitle ($title)
 
 convertNamespace ($ns, $variant=null)
 
 hasVariants ()
 
 hasVariant ($variant)
 
 convertHtml ($text, $isTitle=false)
 
 convertCategoryKey ($key)
 
 getVariants ()
 
 getPreferredVariant ()
 
 getDefaultVariant ()
 
 getURLVariant ()
 
 findVariantLink (&$link, &$nt, $ignoreOtherCond=false)
 
 getExtraHashOptions ()
 
 getParsedTitle ()
 
 updateConversionTable (Title $title)
 
 markNoConversion ($text, $noParse=false)
 
 linkTrail ()
 
 linkPrefixCharset ()
 
 getParentLanguage ()
 
 equals (Language $lang)
 
 getCode ()
 
 getHtmlCode ()
 
 setCode ($code)
 
 fixVariableInNamespace ($talk)
 
 replaceGrammarInNamespace ($m)
 
 formatExpiry ($expiry, $format=true, $infinity= 'infinity')
 
 formatTimePeriod ($seconds, $format=[])
 
 formatBitrate ($bps)
 
 formatComputingNumbers ($size, $boundary, $messageKey)
 
 formatSize ($size)
 
 specialList ($page, $details, $oppositedm=true)
 
 viewPrevNext (Title $title, $offset, $limit, array $query=[], $atend=false)
 
 getConvRuleTitle ()
 
 getCompiledPluralRules ()
 
 getPluralRules ()
 
 getPluralRuleTypes ()
 
 getPluralRuleIndexNumber ($number)
 
 getPluralRuleType ($number)
 

Static Public Member Functions

static factory ($code)
 
static isSupportedLanguage ($code)
 
static isWellFormedLanguageTag ($code, $lenient=false)
 
static isValidCode ($code)
 
static isValidBuiltInCode ($code)
 
static isKnownLanguageTag ($tag)
 
static getLocalisationCache ()
 
static fetchLanguageNames ($inLanguage=null, $include= 'mw')
 
static fetchLanguageName ($code, $inLanguage=null, $include= 'all')
 
static romanNumeral ($num)
 
static hebrewNumeral ($num)
 
static getCodeFromFileName ($filename, $prefix= 'Language', $suffix= '.php')
 
static classFromCode ($code, $fallback=true)
 
static getFileName ($prefix= 'Language', $code, $suffix= '.php')
 
static getMessagesFileName ($code)
 
static getJsonMessagesFileName ($code)
 
static getFallbackFor ($code)
 
static getFallbacksFor ($code)
 
static getFallbacksIncludingSiteLanguage ($code)
 
static getMessagesFor ($code)
 
static getMessageFor ($key, $code)
 
static getMessageKeysFor ($code)
 

Public Attributes

 $mConverter
 
 $mVariants
 
 $mCode
 
 $mLoaded = false
 
 $mMagicExtensions = []
 
 $mMagicHookDone = false
 
 $mParentLanguage = false
 
 $dateFormatStrings = []
 
 $mExtendedSpecialPageAliases
 
 $namespaceAliases
 
 $transformData = []
 

Static Public Attributes

static $dataCache
 
static $mLangObjCache = []
 
static $mWeekdayMsgs
 
static $mWeekdayAbbrevMsgs
 
static $mMonthMsgs
 
static $mMonthGenMsgs
 
static $mMonthAbbrevMsgs
 
static $mIranianCalendarMonthMsgs
 
static $mHebrewCalendarMonthMsgs
 
static $mHebrewCalendarMonthGenMsgs
 
static $mHijriCalendarMonthMsgs
 
static $durationIntervals
 

Protected Member Functions

 msg ($msg)
 
 doMagicHook ()
 
 removeBadCharLast ($string)
 
 removeBadCharFirst ($string)
 
 handleExplicitPluralForms ($count, array $forms)
 
 preConvertPlural ($forms, $count)
 

Static Protected Member Functions

static newFromCode ($code, $fallback=false)
 
static convertDoubleWidth ($string)
 
static insertSpace ($string, $pattern)
 

Protected Attributes

 $namespaceNames
 
 $mNamespaceIds
 

Detailed Description

Internationalisation code

Constructor & Destructor Documentation

Language::__destruct ( )

Reduce memory usage

Member Function Documentation

Language::addMagicWordsByLang (   $newWords)

Add magic words to the extension array

Parameters
array$newWords
Language::alignEnd ( )

Return 'right' or 'left' as appropriate alignment for line-end for this language's text direction.

Should be equivalent to CSS3 'end' text-align value....

Returns
string
Language::alignStart ( )

Return 'left' or 'right' as appropriate alignment for line-start for this language's text direction.

Should be equivalent to CSS3 'start' text-align value....

Returns
string
Language::autoConvert (   $text,
  $variant = false 
)

convert text to a variant

Parameters
string$texttext to convert
string | bool$variantvariant to convert to, or false to use the user's preferred variant (if logged in), or the project default variant
Returns
string the converted string
Language::autoConvertToAllVariants (   $text)

convert text to all supported variants

Parameters
string$text
Returns
array
Language::capitalizeAllNouns ( )
Returns
array
Language::caseFold (   $s)

Return a case-folded representation of $s

This is a representation such that caseFold($s1)==caseFold($s2) if $s1 and $s2 are the same except for the case of their characters. It is not necessary for the value returned to make sense when displayed.

Do not perform any other normalisation in this function. If a caller uses this function when it should be using a more general normalisation function, then fix the caller.

Parameters
string$s
Returns
string
Language::checkTitleEncoding (   $s)
Parameters
string$s
Returns
string
Exceptions
MWException
static Language::classFromCode (   $code,
  $fallback = true 
)
static
Parameters
string$code
bool$fallbackWhether we're going through language fallback chain
Returns
string Name of the language class
Language::commafy (   $number)

Adds commas to a given number

Since
1.19
Parameters
mixed$number
Returns
string
Language::commaList ( array  $list)

Take a list of strings and build a locale-friendly comma-separated list, using the local comma-separator message.

Parameters
string[]$list Array of strings to put in a comma list
Returns
string
Language::convert (   $text)

convert text to different variants of a language.

Parameters
string$text
Returns
string
Language::convertCategoryKey (   $key)
Parameters
string$key
Returns
string
static Language::convertDoubleWidth (   $string)
staticprotected

convert double-width roman characters to single-width. range: ff00-ff5f ~= 0020-007f

Parameters
string$string
Returns
string
Language::convertForSearchResult (   $termsArray)
Parameters
array$termsArray
Returns
array
Language::convertGrammar (   $word,
  $case 
)

Grammatical transformations, needed for inflected languages Invoked by putting {{grammar:case|word}} in a message

Parameters
string$word
string$case
Returns
string
Language::convertHtml (   $text,
  $isTitle = false 
)

Perform output conversion on a string, and encode for safe HTML output.

Parameters
string$textText to be converted
bool$isTitleWhether this conversion is for the article title
Returns
string
Todo:
this should get integrated somewhere sane
Language::convertNamespace (   $ns,
  $variant = null 
)

Convert a namespace index to a string in the preferred variant

Parameters
int$nsnamespace index (https://www.mediawiki.org/wiki/Manual:Namespace)
string | null$variantvariant to convert to, or null to use the user's preferred variant (if logged in), or the project default variant
Returns
string a string representation of the namespace
Language::convertPlural (   $count,
  $forms 
)

Plural form transformations, needed for some languages. For example, there are 3 form of plural in Russian and Polish, depending on "count mod 10". See [[w:Plural]] For English it is pretty simple.

Invoked by putting {{plural:count|wordform1|wordform2}} or {{plural:count|wordform1|wordform2|wordform3}}

Example: {{plural:{{NUMBEROFARTICLES}}|article|articles}}

Parameters
int$countNon-localized number
array$formsDifferent plural forms
Returns
string Correct form of plural for $count in this language
Language::convertTitle (   $title)

Convert a Title object to a string in the preferred variant

Parameters
Title$title
Returns
string
Language::date (   $ts,
  $adj = false,
  $format = true,
  $timecorrection = false 
)
Parameters
string$tsThe time format which needs to be turned into a date('YmdHis') format with wfTimestamp(TS_MW,$ts)
bool$adjWhether to adjust the time output according to the user configured offset ($timecorrection)
mixed$formatTrue to use user's date format preference
string | bool$timecorrectionThe time offset as returned by validateTimeZone() in Special:Preferences
Returns
string
Language::dateFormat (   $usePrefs = true)

This is meant to be used by time(), date(), and timeanddate() to get the date preference they're supposed to use, it should be used in all children.

function timeanddate([...], $format = true) {
  $datePreference = $this->dateFormat($format);
  [...]
}
Parameters
int | string | bool$usePrefsIf true, the user's preference is used if false, the site/language default is used if int/string, assumed to be a format.
Returns
string
Language::digitGroupingPattern ( )
Returns
string
Language::digitTransformTable ( )
Returns
array
Language::doMagicHook ( )
protected

Run the LanguageGetMagic hook once.

Language::embedBidi (   $text = '')

Wraps argument with unicode control characters for directionality safety

This solves the problem where directionality-neutral characters at the edge of the argument string get interpreted with the wrong directionality from the enclosing context, giving renderings that look corrupted like "(Ben_(WMF".

The wrapping is LRE...PDF or RLE...PDF, depending on the detected directionality of the argument string, using the BIDI algorithm's own "First strong directional codepoint" rule. Essentially, this works round the fact that there is no embedding equivalent of U+2068 FSI (isolation with heuristic direction inference). The latter is cleaner but still not widely supported.

Parameters
string$textText to wrap
Returns
string Text, wrapped in LRE...PDF or RLE...PDF or nothing
Language::emphasize (   $text)

Italic is unsuitable for some languages

Parameters
string$textThe text to be emphasized.
Returns
string
Language::equals ( Language  $lang)

Compare with an other language object

Since
1.28
Parameters
Language$lang
Returns
bool
static Language::factory (   $code)
static

Get a cached or new language object for a given language code

Parameters
string$code
Exceptions
MWException
Returns
Language
Language::fallback8bitEncoding ( )
Returns
array
static Language::fetchLanguageName (   $code,
  $inLanguage = null,
  $include = 'all' 
)
static
Parameters
string$codeThe code of the language for which to get the name
null | string$inLanguageCode of language in which to return the name (null for autonyms)
string$include'all', 'mw' or 'mwfile'; see fetchLanguageNames()
Returns
string Language name or empty
Since
1.20
static Language::fetchLanguageNames (   $inLanguage = null,
  $include = 'mw' 
)
static

Get an array of language names, indexed by code.

Parameters
null | string$inLanguageCode of language in which to return the names Use null for autonyms (native names)
string$includeOne of: 'all' all available languages 'mw' only if the language is defined in MediaWiki or wgExtraLanguageNames (default) 'mwfile' only if the language is in 'mw' and has a message file
Returns
array Language code => language name
Since
1.20
Language::findVariantLink ( $link,
$nt,
  $ignoreOtherCond = false 
)

If a language supports multiple variants, it is possible that non-existing link in one variant actually exists in another variant. this function tries to find it. See e.g. LanguageZh.php The input parameters may be modified upon return

Parameters
string&$linkThe name of the link
Title&$ntThe title object of the link
bool$ignoreOtherCondTo disable other conditions when we need to transclude a template or update a category's link
Language::firstChar (   $s)

Get the first character of a string.

Parameters
string$s
Returns
string
Language::fixVariableInNamespace (   $talk)
Parameters
string$talk
Returns
mixed
Language::formatBitrate (   $bps)

Format a bitrate for output, using an appropriate unit (bps, kbps, Mbps, Gbps, Tbps, Pbps, Ebps, Zbps or Ybps) according to the magnitude in question.

This use base 1000. For base 1024 use formatSize(), for another base see formatComputingNumbers().

Parameters
int$bps
Returns
string
Language::formatComputingNumbers (   $size,
  $boundary,
  $messageKey 
)
Parameters
int$sizeSize of the unit
int$boundarySize boundary (1000, or 1024 in most cases)
string$messageKeyMessage key to be uesd
Returns
string
Language::formatDuration (   $seconds,
array  $chosenIntervals = [] 
)

Takes a number of seconds and turns it into a text using values such as hours and minutes.

Since
1.20
Parameters
int$secondsThe amount of seconds.
array$chosenIntervalsThe intervals to enable.
Returns
string
Language::formatExpiry (   $expiry,
  $format = true,
  $infinity = 'infinity' 
)

Decode an expiry (block, protection, etc) which has come from the DB

Parameters
string$expiryDatabase expiry String
bool | int$formatTrue to process using language functions, or TS_ constant to return the expiry in a given timestamp
string$infinityIf $format is not true, use this string for infinite expiry
Returns
string
Since
1.18
Language::formatNum (   $number,
  $nocommafy = false 
)

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 Bengali (bn) want ২,৯৩,২৯১.২৩৫ and others such as Icelandic just want to use commas instead of dots, and dots instead of commas like "293.291,235".

An example of this function being called: wfMessage( 'message' )->numParams( $num )->text()

See $separatorTransformTable on MessageIs.php for the , => . and . => , implementation.

Todo:
check if it's viable to use localeconv() for the decimal separator thing.
Parameters
int | float$numberThe string to be formatted, should be an integer or a floating point number.
bool$nocommafySet to true for special numbers like dates
Returns
string
Language::formatNumNoSeparators (   $number)

Front-end for non-commafied formatNum

Parameters
int | float$numberThe string to be formatted, should be an integer or a floating point number.
Since
1.21
Returns
string
Language::formatSize (   $size)

Format a size in bytes for output, using an appropriate unit (B, KB, MB, GB, TB, PB, EB, ZB or YB) according to the magnitude in question

This method use base 1024. For base 1000 use formatBitrate(), for another base see formatComputingNumbers()

Parameters
int$sizeSize to format
Returns
string Plain text (not HTML)
Language::formatTimePeriod (   $seconds,
  $format = [] 
)

Formats a time given in seconds into a string representation of that time.

Parameters
int | float$seconds
array$formatAn optional argument that formats the returned string in different ways: If $format['avoid'] === 'avoidseconds': don't show seconds if $seconds >= 1 hour, If $format['avoid'] === 'avoidminutes': don't show seconds/minutes if $seconds > 48 hours, If $format['noabbrevs'] is true: use 'seconds' and friends instead of 'seconds-abbrev' and friends.
Note
For backwards compatibility, $format may also be one of the strings 'avoidseconds' or 'avoidminutes'.
Returns
string
Language::gender (   $gender,
  $forms 
)

Provides an alternative text depending on specified gender. Usage {{gender:username|masculine|feminine|unknown}}. username is optional, in which case the gender of current user is used, but only in (some) interface messages; otherwise default gender is used.

If no forms are given, an empty string is returned. If only one form is given, it will be returned unconditionally. These details are implied by the caller and cannot be overridden in subclasses.

If three forms are given, the default is to use the third (unknown) form. If fewer than three forms are given, the default is to use the first (masculine) form. These details can be overridden in subclasses.

Parameters
string$gender
array$forms
Returns
string
Language::getAllMessages ( )
Returns
array
Language::getArrow (   $direction = 'forwards')

An arrow, depending on the language direction.

Parameters
string$directionThe direction of the arrow: forwards (default), backwards, left, right, up, down.
Returns
string
Language::getBookstoreList ( )

Exports $wgBookstoreListEn

Returns
array
Language::getCode ( )

Get the internal language code for this language object

NOTE: The return value of this function is NOT HTML-safe and must be escaped with htmlspecialchars() or similar

Returns
string
static Language::getCodeFromFileName (   $filename,
  $prefix = 'Language',
  $suffix = '.php' 
)
static

Get the language code from a file name. Inverse of getFileName()

Parameters
string$filename$prefix . $languageCode . $suffix
string$prefixPrefix before the language code
string$suffixSuffix after the language code
Returns
string Language code, or false if $prefix or $suffix isn't found
Language::getCompiledPluralRules ( )

Get the compiled plural rules for the language

Since
1.20
Returns
array Associative array with plural form, and plural rule as key-value pairs
Language::getConverter ( )

Return the LanguageConverter used in the Language

Since
1.19
Returns
LanguageConverter
Language::getConvRuleTitle ( )

Get the conversion rule title, if any.

Returns
string
Language::getDateFormats ( )
Returns
array
Language::getDateFormatString (   $type,
  $pref 
)

Get a format string for a given type and preference

Parameters
string$typeMay be 'date', 'time', 'both', or 'pretty'.
string$prefThe format name as it appears in Messages*.php under $datePreferences.
Since
1.22 New type 'pretty' that provides a more readable timestamp format
Returns
string
Language::getDatePreferenceMigrationMap ( )
Returns
array
Language::getDatePreferences ( )
Returns
string[]|bool List of date format preference keys, or false if disabled.
Language::getDefaultDateFormat ( )
Returns
array|string
Language::getDefaultVariant ( )
Returns
string
Language::getDir ( )

Return the correct HTML 'dir' attribute value for this language.

Returns
string
Language::getDirMark (   $opposite = false)

A hidden direction mark (LRM or RLM), depending on the language direction. This function produces them as invisible Unicode characters and the output may be hard to read and debug, so it should only be used when the output is plain text or can be escaped. When the output is HTML, use getDirMarkEntity() instead.

Parameters
bool$oppositeGet the direction mark opposite to your language
Returns
string
Language::getDirMarkEntity (   $opposite = false)

A hidden direction mark (LRM or RLM), depending on the language direction. Unlike getDirMark(), this function returns the character as an HTML entity. This function should be used when the output is guaranteed to be HTML, because it makes the output HTML source code more readable. When the output is plain text or can be escaped, getDirMark() should be used.

Parameters
bool$oppositeGet the direction mark opposite to your language
Returns
string
Since
1.20
Language::getDurationIntervals (   $seconds,
array  $chosenIntervals = [] 
)

Takes a number of seconds and returns an array with a set of corresponding intervals. For example 65 will be turned into [ minutes => 1, seconds => 5 ].

Since
1.20
Parameters
int$secondsThe amount of seconds.
array$chosenIntervalsThe intervals to enable.
Returns
array
Language::getExtraHashOptions ( )

returns language specific options used by User::getPageRenderHash() for example, the preferred language variant

Returns
string
Language::getExtraUserToggles ( )
Returns
array
static Language::getFallbackFor (   $code)
static

Get the first fallback for a given language.

Parameters
string$code
Returns
bool|string
Language::getFallbackLanguages ( )
Returns
array
Since
1.19
static Language::getFallbacksFor (   $code)
static

Get the ordered list of fallback languages.

Since
1.19
Parameters
string$codeLanguage code
Returns
array Non-empty array, ending in "en"
static Language::getFallbacksIncludingSiteLanguage (   $code)
static

Get the ordered list of fallback languages, ending with the fallback language chain for the site language.

Since
1.22
Parameters
string$codeLanguage code
Returns
array Array( fallbacks, site fallbacks )
static Language::getFileName (   $prefix = 'Language',
  $code,
  $suffix = '.php' 
)
static

Get the name of a file for a certain language code

Parameters
string$prefixPrepend this to the filename
string$codeLanguage code
string$suffixAppend this to the filename
Exceptions
MWException
Returns
string $prefix . $mangledCode . $suffix
Language::getFormattedNamespaces ( )

A convenience function that returns getNamespaces() with spaces instead of underscores in values. Useful for producing output to be displayed e.g. in <select> forms.

Returns
array
Language::getFormattedNsText (   $index)

A convenience function that returns the same thing as getNsText() except with '_' changed to ' ', useful for producing output.

$mw_ns = $wgContLang->getFormattedNsText( NS_MEDIAWIKI_TALK ); echo $mw_ns; // prints 'MediaWiki talk'

Parameters
int$indexThe array key of the namespace to return
Returns
string Namespace name without underscores (empty string if namespace does not exist)
Language::getGenderNsText (   $index,
  $gender 
)

Returns gender-dependent namespace alias if available. See https://www.mediawiki.org/wiki/Manual:$wgExtraGenderNamespaces

Parameters
int$indexNamespace index
string$genderGender key (male, female... )
Returns
string
Since
1.18
Language::getGrammarForms ( )

Get the grammar forms for the content language

Returns
array Array of grammar forms
Since
1.20
Language::getGrammarTransformations ( )

Get the grammar transformations data for the language. Used like grammar forms, with {{GRAMMAR}} and cases, but uses pairs of regexes and replacements instead of code.

Returns
array[] Array of grammar transformations.
Exceptions
MWException
Since
1.28
Language::getHebrewCalendarMonthName (   $key)
Parameters
string$key
Returns
string
Language::getHebrewCalendarMonthNameGen (   $key)
Parameters
string$key
Returns
string
Language::getHijriCalendarMonthName (   $key)
Parameters
string$key
Returns
string
Language::getHtmlCode ( )

Get the code in BCP 47 format which we can use inside of html lang="" tags.

NOTE: The return value of this function is NOT HTML-safe and must be escaped with htmlspecialchars() or similar.

Since
1.19
Returns
string
Language::getHumanTimestamp ( MWTimestamp  $time,
MWTimestamp  $relativeTo = null,
User  $user = null 
)

Get the timestamp in a human-friendly relative format, e.g., "3 days ago".

Determine the difference between the timestamp and the current time, and generate a readable timestamp by returning "<N> <units> ago", where the largest possible unit is used.

Since
1.26 (Prior to 1.26 method existed but was not meant to be used directly)
Parameters
MWTimestamp$time
MWTimestamp | null$relativeToThe base timestamp to compare to (defaults to now)
User | null$userUser the timestamp is being generated for (or null to use main context's user)
Returns
string Formatted timestamp
Language::getImageFile (   $image)
Parameters
string$image
Returns
array|null
Language::getImageFiles ( )
Returns
array
Since
1.24
Language::getIranianCalendarMonthName (   $key)
Parameters
string$key
Returns
string
static Language::getJsonMessagesFileName (   $code)
static
Parameters
string$code
Returns
string
Exceptions
MWException
Since
1.23
static Language::getLocalisationCache ( )
static

Get the LocalisationCache instance

Returns
LocalisationCache
Language::getLocalNsIndex (   $text)

Get a namespace key by value, case insensitive. Only matches namespace names for the current language, not the canonical ones defined in Namespace.php.

Parameters
string$text
Returns
int|bool An integer if $text is a valid value otherwise false
Language::getMagic (   $mw)

Fill a MagicWord object with data from here

Parameters
MagicWord$mw
Language::getMagicWords ( )

Get all magic words from cache.

Returns
array
Language::getMessage (   $key)
Parameters
string$key
Returns
string|null
static Language::getMessageFor (   $key,
  $code 
)
static

Get a message for a given language

Parameters
string$key
string$code
Returns
string
Language::getMessageFromDB (   $msg)

Get a message from the MediaWiki namespace.

Parameters
string$msgMessage name
Returns
string
static Language::getMessageKeysFor (   $code)
static

Get all message keys for a given language. This is a faster alternative to array_keys( Language::getMessagesFor( $code ) )

Since
1.19
Parameters
string$codeLanguage code
Returns
array Array of message keys (strings)
static Language::getMessagesFileName (   $code)
static
Parameters
string$code
Returns
string
static Language::getMessagesFor (   $code)
static

Get all messages for a given language WARNING: this may take a long time. If you just need all message keys but need the contents of only a few messages, consider using getMessageKeysFor().

Parameters
string$code
Returns
array
Language::getMonthAbbreviation (   $key)
Parameters
string$key
Returns
string
Language::getMonthAbbreviationsArray ( )
Returns
array
Language::getMonthName (   $key)
Parameters
string$key
Returns
string
Language::getMonthNameGen (   $key)
Parameters
string$key
Returns
string
Language::getMonthNamesArray ( )
Returns
array
Language::getNamespaceAliases ( )
Returns
array
Language::getNamespaceIds ( )
Returns
array
Language::getNamespaces ( )

Returns an array of localised namespaces indexed by their numbers. If the namespace is not available in localised form, it will be included in English.

Returns
array
Language::getNsIndex (   $text)

Get a namespace key by value, case insensitive. Canonical namespace names override custom ones defined for the current language.

Parameters
string$text
Returns
int|bool An integer if $text is a valid value otherwise false
Language::getNsText (   $index)

Get a namespace value by key

$mw_ns = $wgContLang->getNsText( NS_MEDIAWIKI ); echo $mw_ns; // prints 'MediaWiki'

Parameters
int$indexThe array key of the namespace to return
Returns
string|bool String if the namespace value exists, otherwise false
Language::getParentLanguage ( )

Get the "parent" language which has a converter to convert a "compatible" language (in another variant) to this language (eg. zh for zh-cn, but not en for en-gb).

Returns
Language|null
Since
1.22
Language::getParsedTitle ( )

For languages that support multiple variants, the title of an article may be displayed differently in different variants. this function returns the apporiate title defined in the body of the article.

Returns
string
Language::getPluralRuleIndexNumber (   $number)

Find the index number of the plural rule appropriate for the given number

Parameters
int$number
Returns
int The index number of the plural rule
Language::getPluralRules ( )

Get the plural rules for the language

Since
1.20
Returns
array Associative array with plural form number and plural rule as key-value pairs
Language::getPluralRuleType (   $number)

Find the plural rule type appropriate for the given number For example, if the language is set to Arabic, getPluralType(5) should return 'few'.

Since
1.22
Parameters
int$number
Returns
string The name of the plural rule type, e.g. one, two, few, many
Language::getPluralRuleTypes ( )

Get the plural rule types for the language

Since
1.22
Returns
array Associative array with plural form number and plural rule type as key-value pairs
Language::getPreferredVariant ( )
Returns
string
Language::getSpecialPageAliases ( )

Get special page names, as an associative array canonical name => array of valid names, including aliases

Returns
array
Language::getURLVariant ( )
Returns
string
Language::getUserToggle (   $tog)
Parameters
string$tog
Returns
string
Language::getVariantname (   $code,
  $usemsg = true 
)

short names for language variants used for language conversion links.

Parameters
string$code
bool$usemsgUse the "variantname-xyz" message if it exists
Returns
string
Language::getVariants ( )

Get the list of variants supported by this language see sample implementation in LanguageZh.php

Returns
string[] An array of language codes
Language::getWeekdayAbbreviation (   $key)
Parameters
string$key
Returns
string
Language::getWeekdayName (   $key)
Parameters
string$key
Returns
string
Language::handleExplicitPluralForms (   $count,
array  $forms 
)
protected

Handles explicit plural forms for Language::convertPlural()

In {{PLURAL:$1|0=nothing|one|many}}, 0=nothing will be returned if $1 equals zero. If an explicitly defined plural form matches the $count, then string value returned, otherwise array returned for further consideration by CLDR rules or overridden convertPlural().

Since
1.23
Parameters
int$countNon-localized number
array$formsDifferent plural forms
Returns
array|string
Language::hasVariant (   $variant)

Check if the language has the specific variant

Since
1.19
Parameters
string$variant
Returns
bool
Language::hasVariants ( )

Check if this is a language with variants

Returns
bool
Language::hasWordBreaks ( )

Most writing systems use whitespace to break up words. Some languages such as Chinese don't conventionally do this, which requires special handling when breaking up words for searching etc.

Returns
bool
static Language::hebrewNumeral (   $num)
static

Hebrew Gematria number formatting up to 9999

Parameters
int$num
Returns
string
Language::iconv (   $in,
  $out,
  $string 
)
Parameters
string$in
string$out
string$string
Returns
string
Language::initContLang ( )

Hook which will be called if this is the content language. Descendants can use this to register hook functions or modify globals

Language::initEncoding ( )
Deprecated:
No-op since 1.28
static Language::insertSpace (   $string,
  $pattern 
)
staticprotected
Parameters
string$string
string$pattern
Returns
string
static Language::isKnownLanguageTag (   $tag)
static

Returns true if a language code is an IETF tag known to MediaWiki.

Parameters
string$tag
Since
1.21
Returns
bool
Language::isMultibyte (   $str)
Parameters
string$str
Returns
bool
Language::isRTL ( )

For right-to-left language support

Returns
bool
static Language::isSupportedLanguage (   $code)
static

Checks whether any localisation is available for that language tag in MediaWiki (MessagesXx.php exists).

Parameters
string$codeLanguage tag (in lower case)
Returns
bool Whether language is supported
Since
1.21
static Language::isValidBuiltInCode (   $code)
static

Returns true if a language code is of a valid form for the purposes of internal customisation of MediaWiki, via Messages*.php or *.json.

Parameters
string$code
Exceptions
MWException
Since
1.18
Returns
bool
static Language::isValidCode (   $code)
static

Returns true if a language code string is of a valid form, whether or not it exists. This includes codes which are used solely for customisation via the MediaWiki namespace.

Parameters
string$code
Returns
bool
static Language::isWellFormedLanguageTag (   $code,
  $lenient = false 
)
static

Returns true if a language code string is a well-formed language tag according to RFC 5646. This function only checks well-formedness; it doesn't check that language, script or variant codes actually exist in the repositories.

Based on regexes by Mark Davis of the Unicode Consortium: http://unicode.org/repos/cldr/trunk/tools/java/org/unicode/cldr/util/data/langtagRegex.txt

Parameters
string$code
bool$lenientWhether to allow '_' as separator. The default is only '-'.
Returns
bool
Since
1.21
Language::lc (   $str,
  $first = false 
)
Parameters
string$str
bool$first
Returns
mixed|string
Language::lcfirst (   $str)
Parameters
string$str
Returns
mixed|string
Language::linkPrefixCharset ( )

A regular expression character set to match legal word-prefixing characters which should be merged onto a link of the form foo[[bar]].

Returns
string
Language::linkPrefixExtension ( )

To allow "foo[[bar]]" to extend the link over the whole word "foobar"

Returns
bool
Language::linkTrail ( )

A regular expression to match legal word-trailing characters which should be merged onto a link of the form [[foo]]bar.

Returns
string
Language::listToText ( array  $l)

Take a list of strings and build a locale-friendly comma-separated list, using the local comma-separator message. The last two strings are chained with an "and". NOTE: This function will only work with standard numeric array keys (0, 1, 2…)

Parameters
string[]$l
Returns
string
Language::markNoConversion (   $text,
  $noParse = false 
)

Prepare external link text for conversion. When the text is a URL, it shouldn't be converted, and it'll be wrapped in the "raw" tag (-{R| }-) to prevent conversion.

This function is called "markNoConversion" for historical reasons.

Parameters
string$textText to be used for external link
bool$noParseWrap it without confirming it's a real URL first
Returns
string The tagged text
Language::minimumGroupingDigits ( )
Returns
int|null
Language::msg (   $msg)
protected

Get message object in this language. Only for use inside this class.

Parameters
string$msgMessage name
Returns
Message
Language::needsGenderDistinction ( )

Whether this language uses gender-dependent namespace aliases. See https://www.mediawiki.org/wiki/Manual:$wgExtraGenderNamespaces

Returns
bool
Since
1.18
Todo:
There may be other gender namespace than NS_USER & NS_USER_TALK in the future
static Language::newFromCode (   $code,
  $fallback = false 
)
staticprotected

Create a language object for a given language code

Parameters
string$code
bool$fallbackWhether we're going through language fallback chain
Exceptions
MWException
Returns
Language
Language::normalize (   $s)

Convert a UTF-8 string to normal form C. In Malayalam and Arabic, this also cleans up certain backwards-compatible sequences, converting them to the modern Unicode equivalent.

This is language-specific for performance reasons only.

Parameters
string$s
Returns
string
Language::normalizeForSearch (   $string)

Some languages have special punctuation need to be normalized. Make such changes here.

Parameters
string$string
Returns
string
Language::parseFormattedNumber (   $number)
Parameters
string$number
Returns
string
Language::pipeList ( array  $list)

Same as commaList, but separate it with the pipe instead.

Parameters
string[]$list Array of strings to put in a pipe list
Returns
string
Language::preConvertPlural (   $forms,
  $count 
)
protected

Checks that convertPlural was given an array and pads it to requested amount of forms by copying the last one.

Parameters
array$formsArray of forms given to convertPlural
int$countHow many forms should there be at least
Returns
array Padded array of forms or an exception if not an array
Language::recodeForEdit (   $s)
Parameters
string$s
Returns
string
Deprecated:
No-op since 1.28
Language::recodeInput (   $s)
Parameters
string$s
Returns
string
Deprecated:
No-op since 1.28
Language::removeBadCharFirst (   $string)
protected

Remove bytes that represent an incomplete Unicode character at the start of string (e.g. bytes of the char are missing)

Parameters
string$string
Returns
string
Language::removeBadCharLast (   $string)
protected

Remove bytes that represent an incomplete Unicode character at the end of string (e.g. bytes of the char are missing)

Parameters
string$string
Returns
string
Language::replaceGrammarInNamespace (   $m)
Parameters
string$m
Returns
string
Language::resetNamespaces ( )

Resets all of the namespace caches. Mainly used for testing

static Language::romanNumeral (   $num)
static

Roman number formatting up to 10000

Parameters
int$num
Returns
string
Language::segmentByWord (   $string)

Some languages such as Chinese require word segmentation, Specify such segmentation when overridden in derived class.

Parameters
string$string
Returns
string
Language::segmentForDiff (   $text)

languages like Chinese need to be segmented in order for the diff to be of any use

Parameters
string$text
Returns
string
Language::semicolonList ( array  $list)

Take a list of strings and build a locale-friendly semicolon-separated list, using the local semicolon-separator message.

Parameters
string[]$list Array of strings to put in a semicolon list
Returns
string
Language::separatorTransformTable ( )
Returns
array
Language::setCode (   $code)
Parameters
string$code
Language::setNamespaces ( array  $namespaces)

Arbitrarily set all of the namespace names at once. Mainly used for testing

Parameters
array$namespacesArray of namespaces (id => name)
Language::specialList (   $page,
  $details,
  $oppositedm = true 
)

Make a list item, used by various special pages

Parameters
string$pagePage link
string$detailsHTML safe text between brackets
bool$oppositedmAdd the direction mark opposite to your language, to display text properly
Returns
string HTML escaped
Language::sprintfDate (   $format,
  $ts,
DateTimeZone  $zone = null,
$ttl = 'unused' 
)

This is a workalike of PHP's date() function, but with better internationalisation, a reduced set of format characters, and a better escaping format.

Supported format characters are dDjlNwzWFmMntLoYyaAgGhHiscrUeIOPTZ. See the PHP manual for definitions. There are a number of extensions, which start with "x":

xn Do not translate digits of the next numeric format character xN Toggle raw digit (xn) flag, stays set until explicitly unset xr Use roman numerals for the next numeric format character xh Use hebrew numerals for the next numeric format character xx Literal x xg Genitive month name

xij j (day number) in Iranian calendar xiF F (month name) in Iranian calendar xin n (month number) in Iranian calendar xiy y (two digit year) in Iranian calendar xiY Y (full year) in Iranian calendar xit t (days in month) in Iranian calendar xiz z (day of the year) in Iranian calendar

xjj j (day number) in Hebrew calendar xjF F (month name) in Hebrew calendar xjt t (days in month) in Hebrew calendar xjx xg (genitive month name) in Hebrew calendar xjn n (month number) in Hebrew calendar xjY Y (full year) in Hebrew calendar

xmj j (day number) in Hijri calendar xmF F (month name) in Hijri calendar xmn n (month number) in Hijri calendar xmY Y (full year) in Hijri calendar

xkY Y (full year) in Thai solar calendar. Months and days are identical to the Gregorian calendar xoY Y (full year) in Minguo calendar or Juche year. Months and days are identical to the Gregorian calendar xtY Y (full year) in Japanese nengo. Months and days are identical to the Gregorian calendar

Characters enclosed in double quotes will be considered literal (with the quotes themselves removed). Unmatched quotes will be considered literal quotes. Example:

"The month is" F => The month is January i's" => 20'11"

Backslash escaping is also supported.

Input timestamp is assumed to be pre-normalized to the desired local time zone, if any. Note that the format characters crUeIOPTZ will assume $ts is UTC if $zone is not given.

Parameters
string$format
string$ts14-character timestamp YYYYMMDDHHMMSS 01234567890123
DateTimeZone$zoneTimezone of $ts
int&$ttlThe amount of time (in seconds) the output may be cached for. Only makes sense if $ts is the current time.
Todo:
handling of "o" format character for Iranian, Hebrew, Hijri & Thai?
Exceptions
MWException
Returns
string
Language::time (   $ts,
  $adj = false,
  $format = true,
  $timecorrection = false 
)
Parameters
string$tsThe time format which needs to be turned into a date('YmdHis') format with wfTimestamp(TS_MW,$ts)
bool$adjWhether to adjust the time output according to the user configured offset ($timecorrection)
mixed$formatTrue to use user's date format preference
string | bool$timecorrectionThe time offset as returned by validateTimeZone() in Special:Preferences
Returns
string
Language::timeanddate (   $ts,
  $adj = false,
  $format = true,
  $timecorrection = false 
)
Parameters
string$tsThe time format which needs to be turned into a date('YmdHis') format with wfTimestamp(TS_MW,$ts)
bool$adjWhether to adjust the time output according to the user configured offset ($timecorrection)
mixed$formatWhat format to return, if it's false output the default one (default true)
string | bool$timecorrectionThe time offset as returned by validateTimeZone() in Special:Preferences
Returns
string
Language::transformUsingPairFile (   $file,
  $string 
)

Transform a string using serialized data stored in the given file (which must be in the serialized subdirectory of $IP). The file contains pairs mapping source characters to destination characters.

The data is cached in process memory. This will go faster if you have the FastStringSearch extension.

Parameters
string$file
string$string
Exceptions
MWException
Returns
string
Language::translateBlockExpiry (   $str,
User  $user = null,
  $now = 0 
)
Todo:
Maybe translate block durations. Note that this function is somewhat misnamed: it deals with translating the duration ("1 week", "4 days", etc), not the expiry time (which is an absolute timestamp). Please note: do NOT add this blindly, as it is used on old expiry lengths recorded in log entries. You'd need to provide the start date to match up with it.
Parameters
string$strThe validated block duration in English
User$userUser object to use timezone from or null for $wgUser
int$nowCurrent timestamp, for formatting relative block durations
Returns
string Somehow translated block duration
See Also
LanguageFi.php for example implementation
Language::truncate (   $string,
  $length,
  $ellipsis = '...',
  $adjustLength = true 
)

This method is deprecated since 1.31 and kept as alias for truncateForDatabase, which has replaced it. This method provides truncation suitable for DB.

The database offers limited byte lengths for some columns in the database; multi-byte character sets mean we need to ensure that only whole characters are included, otherwise broken characters can be passed to the user.

Deprecated:
since 1.31, use truncateForDatabase or truncateForVisual as appropriate.
Parameters
string$stringString to truncate
int$lengthMaximum length (including ellipsis)
string$ellipsisString to append to the truncated text
bool$adjustLengthSubtract length of ellipsis from $length. $adjustLength was introduced in 1.18, before that behaved as if false.
Returns
string
Language::truncateForDatabase (   $string,
  $length,
  $ellipsis = '...',
  $adjustLength = true 
)

Truncate a string to a specified length in bytes, appending an optional string (e.g. for ellipsis)

If $length is negative, the string will be truncated from the beginning

Since
1.31
Parameters
string$stringString to truncate
int$lengthMaximum length in bytes
string$ellipsisString to append to the end of truncated text
bool$adjustLengthSubtract length of ellipsis from $length
Returns
string
Language::truncateForVisual (   $string,
  $length,
  $ellipsis = '...',
  $adjustLength = true 
)

Truncate a string to a specified number of characters, appending an optional string (e.g. for ellipsis).

This provides multibyte version of truncate() method of this class, suitable for truncation based on number of characters, instead of number of bytes.

If $length is negative, the string will be truncated from the beginning.

Since
1.31
Parameters
string$stringString to truncate
int$lengthMaximum number of characters
string$ellipsisString to append to the end of truncated text
bool$adjustLengthSubtract length of ellipsis from $length
Returns
string
Language::truncateHtml (   $text,
  $length,
  $ellipsis = '...' 
)

Truncate a string of valid HTML to a specified length in bytes, appending an optional string (e.g. for ellipses), and return valid HTML

This is only intended for styled/linked text, such as HTML with tags like and , were the tags are self-contained (valid HTML). Also, this will not detect things like "display:none" CSS.

Note: since 1.18 you do not need to leave extra room in $length for ellipses.

Parameters
string$textHTML string to truncate
int$length(zero/positive) Maximum length (including ellipses)
string$ellipsisString to append to the truncated text
Returns
string

Language::uc (   $str,
  $first = false 
)

Convert a string to uppercase

Parameters
string$str
bool$first
Returns
string
Language::ucfirst (   $str)

Make a string's first character uppercase

Parameters
string$str
Returns
string
Language::ucwordbreaks (   $str)

capitalize words at word breaks

Parameters
string$str
Returns
mixed
Language::ucwordbreaksCallbackAscii (   $matches)
Parameters
array$matches
Returns
mixed|string
Language::ucwordbreaksCallbackMB (   $matches)
Parameters
array$matches
Returns
string
Language::ucwords (   $str)
Parameters
string$str
Returns
mixed|string
Language::ucwordsCallbackMB (   $matches)
Parameters
array$matches
Returns
string
Language::unsegmentForDiff (   $text)

and unsegment to show the result

Parameters
string$text
Returns
string
Language::updateConversionTable ( Title  $title)

Refresh the cache of conversion tables when MediaWiki:Conversiontable* is updated.

Parameters
Title$titleThe Title of the page being updated
Language::userAdjust (   $ts,
  $tz = false 
)

Used by date() and time() to adjust the time output.

Parameters
string$tsThe time in date('YmdHis') format
mixed$tzAdjust the time by this amount (default false, mean we get user timecorrection setting)
Returns
int
Language::userDate (   $ts,
User  $user,
array  $options = [] 
)

Get the formatted date for the given timestamp and formatted for the given user.

Parameters
mixed$tsMixed: the time format which needs to be turned into a date('YmdHis') format with wfTimestamp(TS_MW,$ts)
User$userUser object used to get preferences for timezone and format
array$optionsArray, can contain the following keys:
  • 'timecorrection': time correction, can have the following values:
    • true: use user's preference
    • false: don't use time correction
    • int: value of time correction in minutes
  • 'format': format to use, can have the following values:
    • true: use user's preference
    • false: use default preference
    • string: format to use
Since
1.19
Returns
string
Language::userTime (   $ts,
User  $user,
array  $options = [] 
)

Get the formatted time for the given timestamp and formatted for the given user.

Parameters
mixed$tsThe time format which needs to be turned into a date('YmdHis') format with wfTimestamp(TS_MW,$ts)
User$userUser object used to get preferences for timezone and format
array$optionsArray, can contain the following keys:
  • 'timecorrection': time correction, can have the following values:
    • true: use user's preference
    • false: don't use time correction
    • int: value of time correction in minutes
  • 'format': format to use, can have the following values:
    • true: use user's preference
    • false: use default preference
    • string: format to use
Since
1.19
Returns
string
Language::userTimeAndDate (   $ts,
User  $user,
array  $options = [] 
)

Get the formatted date and time for the given timestamp and formatted for the given user.

Parameters
mixed$tsThe time format which needs to be turned into a date('YmdHis') format with wfTimestamp(TS_MW,$ts)
User$userUser object used to get preferences for timezone and format
array$optionsArray, can contain the following keys:
  • 'timecorrection': time correction, can have the following values:
    • true: use user's preference
    • false: don't use time correction
    • int: value of time correction in minutes
  • 'format': format to use, can have the following values:
    • true: use user's preference
    • false: use default preference
    • string: format to use
Since
1.19
Returns
string
Language::viewPrevNext ( Title  $title,
  $offset,
  $limit,
array  $query = [],
  $atend = false 
)

Generate (prev x| next x) (20|50|100...) type links for paging

Parameters
Title$titleTitle object to link
int$offset
int$limit
array$queryOptional URL query parameter string
bool$atendOptional param for specified if this is the last page
Returns
string

Member Data Documentation

Language::$durationIntervals
static
Initial value:
= [
'millennia' => 31556952000
Language::$mHebrewCalendarMonthGenMsgs
static
Initial value:
= [
'hebrew-calendar-m1-gen', 'hebrew-calendar-m2-gen', 'hebrew-calendar-m3-gen',
'hebrew-calendar-m4-gen', 'hebrew-calendar-m5-gen', 'hebrew-calendar-m6-gen',
'hebrew-calendar-m7-gen', 'hebrew-calendar-m8-gen', 'hebrew-calendar-m9-gen',
'hebrew-calendar-m10-gen', 'hebrew-calendar-m11-gen', 'hebrew-calendar-m12-gen',
'hebrew-calendar-m6a-gen', 'hebrew-calendar-m6b-gen'
]
Language::$mHebrewCalendarMonthMsgs
static
Initial value:
= [
'hebrew-calendar-m1', 'hebrew-calendar-m2', 'hebrew-calendar-m3',
'hebrew-calendar-m4', 'hebrew-calendar-m5', 'hebrew-calendar-m6',
'hebrew-calendar-m7', 'hebrew-calendar-m8', 'hebrew-calendar-m9',
'hebrew-calendar-m10', 'hebrew-calendar-m11', 'hebrew-calendar-m12',
'hebrew-calendar-m6a', 'hebrew-calendar-m6b'
]
Language::$mHijriCalendarMonthMsgs
static
Initial value:
= [
'hijri-calendar-m1', 'hijri-calendar-m2', 'hijri-calendar-m3',
'hijri-calendar-m4', 'hijri-calendar-m5', 'hijri-calendar-m6',
'hijri-calendar-m7', 'hijri-calendar-m8', 'hijri-calendar-m9',
'hijri-calendar-m10', 'hijri-calendar-m11', 'hijri-calendar-m12'
]
Language::$mIranianCalendarMonthMsgs
static
Initial value:
= [
'iranian-calendar-m1', 'iranian-calendar-m2', 'iranian-calendar-m3',
'iranian-calendar-m4', 'iranian-calendar-m5', 'iranian-calendar-m6',
'iranian-calendar-m7', 'iranian-calendar-m8', 'iranian-calendar-m9',
'iranian-calendar-m10', 'iranian-calendar-m11', 'iranian-calendar-m12'
]
Language::$mMonthAbbrevMsgs
static
Initial value:
= [
'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug',
'sep', 'oct', 'nov', 'dec'
]
Language::$mMonthGenMsgs
static
Initial value:
= [
'january-gen', 'february-gen', 'march-gen', 'april-gen', 'may-gen', 'june-gen',
'july-gen', 'august-gen', 'september-gen', 'october-gen', 'november-gen',
'december-gen'
]
Language::$mMonthMsgs
static
Initial value:
= [
'january', 'february', 'march', 'april', 'may_long', 'june',
'july', 'august', 'september', 'october', 'november',
'december'
]
Language::$mWeekdayAbbrevMsgs
static
Initial value:
= [
'sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'
]
Language::$mWeekdayMsgs
static
Initial value:
= [
'sunday', 'monday', 'tuesday', 'wednesday', 'thursday',
'friday', 'saturday'
]
Language::$transformData = []

ReplacementArray object caches


The documentation for this class was generated from the following file: