MediaWiki  REL1_24
Language Class Reference

Internationalisation code. More...

Inheritance diagram for Language:
Collaboration diagram for Language:

List of all members.

Public Member Functions

 __construct ()
 __destruct ()
 Reduce memory usage.
 addMagicWordsByLang ($newWords)
 Add magic words to the extension array.
 alignEnd ()
 Return 'right' or 'left' as appropriate alignment for line-end for this language's text direction.
 alignStart ()
 Return 'left' or 'right' as appropriate alignment for line-start for this language's text direction.
 armourMath ($text)
 Put custom tags (e.g.
 autoConvertToAllVariants ($text)
 convert text to all supported variants
 capitalizeAllNouns ()
 caseFold ($s)
 Return a case-folded representation of $s.
 checkTitleEncoding ($s)
 commafy ($number)
 Adds commas to a given number.
 commaList (array $list)
 Take a list of strings and build a locale-friendly comma-separated list, using the local comma-separator message.
 convert ($text)
 convert text to different variants of a language.
 convertCategoryKey ($key)
 convertForSearchResult ($termsArray)
 convertGrammar ($word, $case)
 Grammatical transformations, needed for inflected languages Invoked by putting {{grammar:case|word}} in a message.
 convertHtml ($text, $isTitle=false)
 Perform output conversion on a string, and encode for safe HTML output.
 convertNamespace ($ns)
 Convert a namespace index to a string in the preferred variant.
 convertPlural ($count, $forms)
 Plural form transformations, needed for some languages.
 convertTitle ($title)
 Convert a Title object to a string in the preferred variant.
 date ($ts, $adj=false, $format=true, $timecorrection=false)
 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.
 digitGroupingPattern ()
 digitTransformTable ()
 emphasize ($text)
 Italic is unsuitable for some languages.
 fallback8bitEncoding ()
 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.
 firstChar ($s)
 Get the first character of a string.
 fixVariableInNamespace ($talk)
 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.
 formatComputingNumbers ($size, $boundary, $messageKey)
 formatDuration ($seconds, array $chosenIntervals=array())
 Takes a number of seconds and turns it into a text using values such as hours and minutes.
 formatExpiry ($expiry, $format=true)
 Decode an expiry (block, protection, etc) which has come from the DB.
 formatNum ($number, $nocommafy=false)
 Normally we output all numbers in plain en_US style, that is 293,291.235 for twohundredninetythreethousand-twohundredninetyone point twohundredthirtyfive.
 formatNumNoSeparators ($number)
 Front-end for non-commafied formatNum.
 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.
 formatTimePeriod ($seconds, $format=array())
 gender ($gender, $forms)
 Provides an alternative text depending on specified gender.
 getAllMessages ()
 getArrow ($direction= 'forwards')
 An arrow, depending on the language direction.
 getBookstoreList ()
 Exports $wgBookstoreListEn.
 getCode ()
 Get the RFC 3066 code for this language object.
 getCompiledPluralRules ()
 Get the compiled plural rules for the language.
 getConverter ()
 Return the LanguageConverter used in the Language.
 getConvRuleTitle ()
 Get the conversion rule title, if any.
 getDateFormats ()
 getDateFormatString ($type, $pref)
 Get a format string for a given type and preference.
 getDatePreferenceMigrationMap ()
 getDatePreferences ()
 getDefaultDateFormat ()
 getDefaultVariant ()
 getDir ()
 Return the correct HTML 'dir' attribute value for this language.
 getDirMark ($opposite=false)
 A hidden direction mark (LRM or RLM), depending on the language direction.
 getDirMarkEntity ($opposite=false)
 A hidden direction mark (LRM or RLM), depending on the language direction.
 getDurationIntervals ($seconds, array $chosenIntervals=array())
 Takes a number of seconds and returns an array with a set of corresponding intervals.
 getExtraHashOptions ()
 returns language specific options used by User::getPageRenderHash() for example, the preferred language variant
 getExtraUserToggles ()
 getFallbackLanguages ()
 getFormattedNamespaces ()
 A convenience function that returns the same thing as getNamespaces() except with the array values changed to ' ' where it found '_', useful for producing output to be displayed e.g.
 getFormattedNsText ($index)
 A convenience function that returns the same thing as getNsText() except with '_' changed to ' ', useful for producing output.
 getGenderNsText ($index, $gender)
 Returns gender-dependent namespace alias if available.
 getGrammarForms ()
 Get the grammar forms for the content language.
 getHebrewCalendarMonthName ($key)
 getHebrewCalendarMonthNameGen ($key)
 getHijriCalendarMonthName ($key)
 getHtmlCode ()
 Get the code in Bcp47 format which we can use inside of html lang="" tags.
 getHumanTimestamp (MWTimestamp $ts, MWTimestamp $relativeTo, User $user)
 Convert an MWTimestamp into a pretty human-readable timestamp using the given user preferences and relative base time.
 getImageFile ($image)
 getImageFiles ()
 getIranianCalendarMonthName ($key)
 getLangObj ()
 getLanguageName ($code)
 Get the native language name of $code.
 getLocalNsIndex ($text)
 Get a namespace key by value, case insensitive.
 getMagic ($mw)
 Fill a MagicWord object with data from here.
 getMagicWords ()
 Get all magic words from cache.
 getMessage ($key)
 getMessageFromDB ($msg)
 Get a message from the MediaWiki namespace.
 getMonthAbbreviation ($key)
 getMonthAbbreviationsArray ()
 getMonthName ($key)
 getMonthNameGen ($key)
 getMonthNamesArray ()
 getNamespaceAliases ()
 getNamespaceIds ()
 getNamespaces ()
 Returns an array of localised namespaces indexed by their numbers.
 getNsIndex ($text)
 Get a namespace key by value, case insensitive.
 getNsText ($index)
 Get a namespace value by key $mw_ns = $wgContLang->getNsText( NS_MEDIAWIKI ); echo $mw_ns; // prints 'MediaWiki'
 getParentLanguage ()
 Get the "parent" language which has a converter to convert a "compatible" language (in another variant) to this language (eg.
 getParsedTitle ()
 For languages that support multiple variants, the title of an article may be displayed differently in different variants.
 getPluralRuleIndexNumber ($number)
 Find the index number of the plural rule appropriate for the given number.
 getPluralRules ()
 Get the plural rules for the 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'.
 getPluralRuleTypes ()
 Get the plural rule types for the language.
 getPreferredVariant ()
 getSpecialPageAliases ()
 Get special page names, as an associative array case folded alias => real name.
 getURLVariant ()
 getUserToggle ($tog)
 getVariantname ($code, $usemsg=true)
 short names for language variants used for language conversion links.
 getVariants ()
 Get the list of variants supported by this language see sample implementation in LanguageZh.php.
 getWeekdayAbbreviation ($key)
 getWeekdayName ($key)
 hasVariant ($variant)
 Check if the language has the specific variant.
 hasVariants ()
 Check if this is a language with variants.
 hasWordBreaks ()
 Most writing systems use whitespace to break up words.
 iconv ($in, $out, $string)
 initContLang ()
 Hook which will be called if this is the content language.
 initEncoding ()
 isMultibyte ($str)
 isRTL ()
 For right-to-left language support.
 lc ($str, $first=false)
 lcCallback ($matches)
 lcfirst ($str)
 linkPrefixCharset ()
 A regular expression character set to match legal word-prefixing characters which should be merged onto a link of the form foo[[bar]].
 linkPrefixExtension ()
 To allow "foo[[bar]]" to extend the link over the whole word "foobar".
 linkTrail ()
 A regular expression to match legal word-trailing characters which should be merged onto a link of the form [[foo]]bar.
 listToText (array $l)
 Take a list of strings and build a locale-friendly comma-separated list, using the local comma-separator message.
 markNoConversion ($text, $noParse=false)
 Prepare external link text for conversion.
 needsGenderDistinction ()
 Whether this language uses gender-dependent namespace aliases.
 normalize ($s)
 Convert a UTF-8 string to normal form C.
 normalizeForSearch ($string)
 Some languages have special punctuation need to be normalized.
 parseFormattedNumber ($number)
 pipeList (array $list)
 Same as commaList, but separate it with the pipe instead.
 recodeForEdit ($s)
 recodeInput ($s)
 replaceGrammarInNamespace ($m)
 resetNamespaces ()
 Resets all of the namespace caches.
 segmentByWord ($string)
 Some languages such as Chinese require word segmentation, Specify such segmentation when overridden in derived class.
 segmentForDiff ($text)
 languages like Chinese need to be segmented in order for the diff to be of any use
 semicolonList (array $list)
 Take a list of strings and build a locale-friendly semicolon-separated list, using the local semicolon-separator message.
 separatorTransformTable ()
 setCode ($code)
 setNamespaces (array $namespaces)
 Arbitrarily set all of the namespace names at once.
 specialList ($page, $details, $oppositedm=true)
 Make a list item, used by various special pages.
 specialPage ($name)
 sprintfDate ($format, $ts, DateTimeZone $zone=null, &$ttl=null)
 This is a workalike of PHP's date() function, but with better internationalisation, a reduced set of format characters, and a better escaping format.
 time ($ts, $adj=false, $format=true, $timecorrection=false)
 timeanddate ($ts, $adj=false, $format=true, $timecorrection=false)
 transformUsingPairFile ($file, $string)
 Transform a string using serialized data stored in the given file (which must be in the serialized subdirectory of $IP).
 translateBlockExpiry ($str)
 truncate ($string, $length, $ellipsis= '...', $adjustLength=true)
 Truncate a string to a specified length in bytes, appending an optional string (e.g.
 truncateHtml ($text, $length, $ellipsis= '...')
 Truncate a string of valid HTML to a specified length in bytes, appending an optional string (e.g.
 uc ($str, $first=false)
 Convert a string to uppercase.
 ucCallback ($matches)
 ucfirst ($str)
 Make a string's first character uppercase.
 ucwordbreaks ($str)
 capitalize words at word breaks
 ucwordbreaksCallbackAscii ($matches)
 ucwordbreaksCallbackMB ($matches)
 ucwords ($str)
 ucwordsCallbackMB ($matches)
 ucwordsCallbackWiki ($matches)
 unsegmentForDiff ($text)
 and unsegment to show the result
 userAdjust ($ts, $tz=false)
 Used by date() and time() to adjust the time output.
 userDate ($ts, User $user, array $options=array())
 Get the formatted date for the given timestamp and formatted for the given user.
 userTime ($ts, User $user, array $options=array())
 Get the formatted time for the given timestamp and formatted for the given user.
 userTimeAndDate ($ts, User $user, array $options=array())
 Get the formatted date and time for the given timestamp and formatted for the given user.
 viewPrevNext (Title $title, $offset, $limit, array $query=array(), $atend=false)
 Generate (prev x| next x) (20|50|100...) type links for paging.

Static Public Member Functions

static classFromCode ($code)
static factory ($code)
 Get a cached or new language object for a given language code.
static fetchLanguageName ($code, $inLanguage=null, $include= 'all')
static fetchLanguageNames ($inLanguage=null, $include= 'mw')
 Get an array of language names, indexed by code.
static getCaseMaps ()
static getClassFileName ($code)
static getCodeFromFileName ($filename, $prefix= 'Language', $suffix= '.php')
 Get the language code from a file name.
static getFallbackFor ($code)
 Get the first fallback for a given language.
static getFallbacksFor ($code)
 Get the ordered list of fallback languages.
static getFallbacksIncludingSiteLanguage ($code)
 Get the ordered list of fallback languages, ending with the fallback language chain for the site language.
static getFileName ($prefix= 'Language', $code, $suffix= '.php')
 Get the name of a file for a certain language code.
static getJsonMessagesFileName ($code)
static getLanguageNames ($customisedOnly=false)
 Get native language names, indexed by code.
static getLocalisationCache ()
 Get the LocalisationCache instance.
static getMessageFor ($key, $code)
 Get a message for a given language.
static getMessageKeysFor ($code)
 Get all message keys for a given language.
static getMessagesFileName ($code)
static getMessagesFor ($code)
 Get all messages for a given language WARNING: this may take a long time.
static getTranslatedLanguageNames ($code)
 Get translated language names.
static hebrewNumeral ($num)
 Hebrew Gematria number formatting up to 9999.
static isKnownLanguageTag ($tag)
 Returns true if a language code is an IETF tag known to MediaWiki.
static isSupportedLanguage ($code)
 Checks whether any localisation is available for that language tag in MediaWiki (MessagesXx.php exists).
static isValidBuiltInCode ($code)
 Returns true if a language code is of a valid form for the purposes of internal customisation of MediaWiki, via Messages*.php or *.json.
static isValidCode ($code)
 Returns true if a language code string is of a valid form, whether or not it exists.
static isWellFormedLanguageTag ($code, $lenient=false)
 Returns true if a language code string is a well-formed language tag according to RFC 5646.
static preloadLanguageClass ($class)
 Includes language class files.
static romanNumeral ($num)
 Roman number formatting up to 10000.

Public Attributes

 $dateFormatStrings = array()
 $mCode
LanguageConverter $mConverter
 $mExtendedSpecialPageAliases
 $mLoaded = false
 $mMagicExtensions = array()
 $mMagicHookDone = false
 $mNamespaceIds
 $mParentLanguage = false
 $mVariants
 $namespaceAliases
 $transformData = array()
 ReplacementArray object caches.

Static Public Attributes

static $dataCache
static $durationIntervals
static $mHebrewCalendarMonthGenMsgs
static $mHebrewCalendarMonthMsgs
static $mHijriCalendarMonthMsgs
static $mIranianCalendarMonthMsgs
static $mLangObjCache = array()
static $mMonthAbbrevMsgs
static $mMonthGenMsgs
static $mMonthMsgs
static $mWeekdayAbbrevMsgs
static $mWeekdayMsgs

Protected Member Functions

 doMagicHook ()
 Run the LanguageGetMagic hook once.
 handleExplicitPluralForms ($count, array $forms)
 Handles explicit plural forms for Language::convertPlural()
 preConvertPlural ($forms, $count)
 Checks that convertPlural was given an array and pads it to requested amount of forms by copying the last one.
 removeBadCharFirst ($string)
 Remove bytes that represent an incomplete Unicode character at the start of string (e.g.
 removeBadCharLast ($string)
 Remove bytes that represent an incomplete Unicode character at the end of string (e.g.

Static Protected Member Functions

static convertDoubleWidth ($string)
 convert double-width roman characters to single-width.
static insertSpace ($string, $pattern)
static newFromCode ($code)
 Create a language object for a given language code.

Protected Attributes

 $namespaceNames

Private Member Functions

 internalUserTimeAndDate ($type, $ts, User $user, array $options)
 Internal helper function for userDate(), userTime() and userTimeAndDate()
 numLink (Title $title, $offset, $limit, array $query, $link, $tooltipMsg, $class)
 Helper function for viewPrevNext() that generates links.
 truncate_endBracket (&$tag, $tagType, $lastCh, &$openTags)
 truncateHtml() helper function (a) push or pop $tag from $openTags as needed (b) clear $tag value
 truncate_skip (&$ret, $text, $search, $start, $len=null)
 truncateHtml() helper function like strcspn() but adds the skipped chars to $ret

Static Private Member Functions

static dateTimeObjFormat (&$dateTimeObj, $ts, $zone, $code)
 Pass through result from $dateTimeObj->format()
static hebrewYearStart ($year)
 This calculates the Hebrew year start, as days since 1 September.
static tsToHebrew ($ts)
 Converting Gregorian dates to Hebrew dates.
static tsToHijri ($ts)
 Converting Gregorian dates to Hijri dates.
static tsToIranian ($ts)
 Algorithm by Roozbeh Pournader and Mohammad Toossi to convert Gregorian dates to Iranian dates.
static tsToYear ($ts, $cName)
 Algorithm to convert Gregorian dates to Thai solar dates, Minguo dates or Minguo dates.

Private Attributes

 $mHtmlCode = null

Static Private Attributes

static $fallbackLanguageCache = array()
static $GREG_DAYS = array( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 )
static $IRANIAN_DAYS = array( 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29 )

Detailed Description

Internationalisation code.

Definition at line 41 of file Language.php.


Constructor & Destructor Documentation

Reduce memory usage.

Definition at line 432 of file Language.php.


Member Function Documentation

Add magic words to the extension array.

Parameters:
array$newWords

Definition at line 3164 of file Language.php.

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

Definition at line 3031 of file Language.php.

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

Definition at line 3019 of file Language.php.

Language::armourMath ( text)

Put custom tags (e.g.

-{ }-) around math to prevent conversion

Parameters:
string$text
Returns:
string
Deprecated:
since 1.22 is no longer used

Definition at line 3980 of file Language.php.

convert text to all supported variants

Parameters:
string$text
Returns:
array

Definition at line 3919 of file Language.php.

Returns:
array

Definition at line 3075 of file Language.php.

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

Definition at line 2743 of file Language.php.

Parameters:
string$s
Returns:
string

Definition at line 2751 of file Language.php.

static Language::classFromCode ( code) [static]
Parameters:
string$code
Returns:
string Name of the language class

Definition at line 379 of file Language.php.

Language::commafy ( number)

Adds commas to a given number.

Since:
1.19
Parameters:
mixed$number
Returns:
string

Reimplemented in LanguageKk_cyrl, LanguageKsh, LanguageRu, LanguageUk, LanguageHy, LanguageKaa, LanguageBe_tarask, LanguageKu_ku, LanguageBg, LanguageEt, LanguageKm, LanguageMy, LanguageEs, and LanguagePl.

Definition at line 3285 of file Language.php.

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

Definition at line 3393 of file Language.php.

Language::convert ( text)

convert text to different variants of a language.

Parameters:
string$text
Returns:
string

Definition at line 3929 of file Language.php.

Parameters:
string$key
Returns:
string

Definition at line 3999 of file Language.php.

static Language::convertDoubleWidth ( string) [static, protected]

convert double-width roman characters to single-width.

range: ff00-ff5f ~= 0020-007f

Parameters:
string$string
Returns:
string

Definition at line 2811 of file Language.php.

Referenced by LanguageZh\convertForSearchResult(), and LanguageYue\normalizeForSearch().

Parameters:
array$termsArray
Returns:
array

Reimplemented in LanguageZh.

Definition at line 2841 of file Language.php.

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

Reimplemented in LanguageKk, LanguageKsh, LanguageOs, LanguageHe, LanguageLa, LanguageBs, LanguageKaa, LanguageRu, LanguageHy, LanguageSl, LanguageTyv, LanguageDsb, LanguageFi, LanguageGa, LanguageUk, LanguageCu, LanguageHsb, and LanguageHu.

Definition at line 3705 of file Language.php.

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

Definition at line 3991 of file Language.php.

Convert a namespace index to a string in the preferred variant.

Parameters:
int$ns
Returns:
string

Definition at line 3949 of file Language.php.

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

Reimplemented in LanguageKsh.

Definition at line 3776 of file Language.php.

Language::convertTitle ( title)

Convert a Title object to a string in the preferred variant.

Parameters:
Title$title
Returns:
string

Definition at line 3939 of file Language.php.

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

Reimplemented in LanguageWa.

Definition at line 2161 of file Language.php.

Referenced by LanguageFi\translateBlockExpiry().

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

Definition at line 2099 of file Language.php.

Referenced by LanguageWa\date(), and LanguageWa\timeanddate().

static Language::dateTimeObjFormat ( &$  dateTimeObj,
ts,
zone,
code 
) [static, private]

Pass through result from $dateTimeObj->format()

Parameters:
DateTime | bool | null&$dateTimeObj
string$ts
DateTimeZone | bool | null$zone
string$code
Returns:
string

Definition at line 1042 of file Language.php.

Returns:
string

Definition at line 3337 of file Language.php.

Returns:
array

Definition at line 3344 of file Language.php.

Language::doMagicHook ( ) [protected]

Run the LanguageGetMagic hook once.

Definition at line 3123 of file Language.php.

Language::emphasize ( text)

Italic is unsuitable for some languages.

Parameters:
string$textThe text to be emphasized.
Returns:
string

Reimplemented in LanguageJa.

Definition at line 3198 of file Language.php.

static Language::factory ( code) [static]

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

Parameters:
string$code
Returns:
Language

Definition at line 150 of file Language.php.

Referenced by CliInstaller\__construct(), BackupDumperPageTest\addDBData(), MessageCacheTest\configureLanguages(), ApiQueryAllMessages\execute(), DateFormats\execute(), ListVariants\execute(), LangMemUsage\execute(), PurgeParserCache\execute(), UpdateMediaWiki\execute(), OldChangesListTest\getContext(), ResourceLoaderLanguageDataModule\getData(), ResourceLoaderContext\getDirection(), Title\getEditNotices(), RequestContext\getLanguage(), ResourceLoaderEditToolbarModule\getLessVars(), TestRecentChangesHelper\getTestContext(), MediaWikiTitleCodecTest\makeCodec(), MessageTest\provideConstructor(), DerivativeContext\setLanguage(), RequestContext\setLanguage(), MessageTest\setUp(), HtmlTest\setUp(), RevisionTest\setUp(), TitleTest\setUp(), LanguageConverterTest\setUp(), MediaWikiLangTestCase\setUp(), MWTimestampTest\setUp(), XmlTest\setUp(), TestSample\setUp(), ExtraParserTest\setUp(), SpecialPageTest\setUp(), BlockTest\setUp(), OldChangesListTest\setUp(), MediaWikiPageLinkRendererTest\setUp(), MediaWikiTitleCodecTest\setUp(), SideBarTest\setUp(), LanguageClassesTestCase\setUp(), ParserTest\setupGlobals(), MessageTest\testGetLanguageCode(), SpecialPageFactoryTest\testGetLocalNameFor(), LanguageTest\testGetNamespaceAliases(), MediaWikiPageLinkRendererTest\testGetPageUrl(), TitleTest\testGetPageViewLanguage(), LanguageTest\testGetParentLanguage(), SpecialPageFactoryTest\testGetTitleForAlias(), MessageTest\testInContentLanguage(), MessageTest\testInContentLanguageOverride(), MessageTest\testInLanguage(), MessageTest\testMessageBitrateParams(), MessageTest\testMessageDurationParams(), MessageTest\testMessageExpiryParams(), MessageTest\testMessageNumParams(), MessageTest\testMessageSizeParams(), MessageTest\testMessageTimeperiodParams(), LanguageTest\testParseFormattedNumber(), MediaWikiPageLinkRendererTest\testRenderHtmlLink(), SpecialPageTest\testRequireLoginAnon(), SpecialPageFactoryTest\testResolveAlias(), ArticleTablesTest\testTemplatelinksUsesContentLanguage(), ApiWatch\watchTitle(), wfGetLangObj(), and wfInstallerMain().

Returns:
array

Definition at line 2765 of file Language.php.

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

Definition at line 913 of file Language.php.

Referenced by ApiQueryLangLinks\execute(), PageLangLogFormatter\getMessageParameters(), WikiStatsOutput\heading(), CoreParserFunctions\language(), WikitextContentHandler\makeRedirectContent(), CheckLanguageCLI\outputWiki(), and InfoAction\pageInfo().

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

Definition at line 847 of file Language.php.

Referenced by ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\appendLanguages(), RebuildLocalisationCache\execute(), DeleteEqualMessages\execute(), ResourceLoaderLanguageNamesModule\getData(), SpecialPageLanguage\getFormFields(), Xml\languageSelector(), Preferences\profilePreferences(), SpecialPageAliasTest\validSpecialPageAliasesProvider(), and wfGetLangObj().

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

Definition at line 4046 of file Language.php.

Get the first character of a string.

Parameters:
string$s
Returns:
string

Definition at line 2853 of file Language.php.

Parameters:
string$talk
Returns:
mixed

Definition at line 4364 of file Language.php.

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

Definition at line 4551 of file Language.php.

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

Definition at line 4561 of file Language.php.

Language::formatDuration ( seconds,
array chosenIntervals = array() 
)

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

Reimplemented in LanguageZh_hans.

Definition at line 2219 of file Language.php.

Language::formatExpiry ( expiry,
format = true 
)

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

Todo:
FIXME: why are we returnings DBMS-dependent strings???
Parameters:
string$expiryDatabase expiry String
bool | int$formatTrue to process using language functions, or TS_ constant to return the expiry in a given timestamp
Returns:
string
Since:
1.18

Definition at line 4422 of file Language.php.

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 Punjabi 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

Definition at line 3224 of file Language.php.

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

Definition at line 3252 of file Language.php.

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)

Definition at line 4599 of file Language.php.

Language::formatTimePeriod ( seconds,
format = array() 
)
Todo:
Document
Parameters:
int | float$seconds
array$formatOptional If $format['avoid'] === 'avoidseconds': don't mention seconds if $seconds >= 1 hour. If $format['avoid'] === 'avoidminutes': don't mention seconds/minutes if $seconds > 48 hours. If $format['noabbrevs'] is true: use 'seconds' and friends instead of 'seconds-abbrev' and friends. For backwards compatibility, $format may also be one of the strings 'avoidseconds' or 'avoidminutes'.
Returns:
string

Definition at line 4451 of file Language.php.

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

Definition at line 3747 of file Language.php.

Returns:
array

Definition at line 2474 of file Language.php.

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

Definition at line 3086 of file Language.php.

Exports $wgBookstoreListEn.

Returns:
array

Definition at line 457 of file Language.php.

static Language::getCaseMaps ( ) [static]
Exceptions:
MWException
Returns:
array

Definition at line 4393 of file Language.php.

static Language::getClassFileName ( code) [static]
Parameters:
string$code
Returns:
string

Definition at line 4251 of file Language.php.

Get the RFC 3066 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

Definition at line 4157 of file Language.php.

Referenced by LanguageHu\convertGrammar().

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

Definition at line 4211 of file Language.php.

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

Definition at line 4701 of file Language.php.

Return the LanguageConverter used in the Language.

Since:
1.19
Returns:
LanguageConverter

Definition at line 3909 of file Language.php.

Get the conversion rule title, if any.

Returns:
string

Definition at line 4692 of file Language.php.

Returns:
array

Definition at line 754 of file Language.php.

Language::getDateFormatString ( type,
pref 
)

Get a format string for a given type and preference.

Parameters:
string$typeMay be date, time or both
string$prefThe format name as it appears in Messages*.php
Since:
1.22 New type 'pretty' that provides a more readable timestamp format
Returns:
string

Definition at line 2129 of file Language.php.

Returns:
array

Definition at line 774 of file Language.php.

Returns:
array

Definition at line 747 of file Language.php.

Returns:
array|string

Definition at line 761 of file Language.php.

Returns:
string

Definition at line 4023 of file Language.php.

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

Returns:
string

Definition at line 3007 of file Language.php.

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

Definition at line 3063 of file Language.php.

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

Definition at line 3046 of file Language.php.

Language::getDurationIntervals ( seconds,
array chosenIntervals = array() 
)

Takes a number of seconds and returns an array with a set of corresponding intervals.

For example 65 will be turned into array( minutes => 1, seconds => 5 ).

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

Definition at line 2245 of file Language.php.

Referenced by LanguageZh_hans\formatDuration().

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

Returns:
string

Definition at line 4056 of file Language.php.

Returns:
array

Definition at line 797 of file Language.php.

static Language::getFallbackFor ( code) [static]

Get the first fallback for a given language.

Parameters:
string$code
Returns:
bool|string

Definition at line 4263 of file Language.php.

Returns:
array
Since:
1.19

Definition at line 449 of file Language.php.

static Language::getFallbacksFor ( code) [static]

Get the ordered list of fallback languages.

Since:
1.19
Parameters:
string$codeLanguage code
Returns:
array

Definition at line 4280 of file Language.php.

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 )

Definition at line 4301 of file Language.php.

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

Definition at line 4196 of file Language.php.

A convenience function that returns the same thing as getNamespaces() except with the array values changed to ' ' where it found '_', useful for producing output to be displayed e.g.

in <select> forms.

Returns:
array

Definition at line 528 of file Language.php.

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)

Definition at line 565 of file Language.php.

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

Definition at line 579 of file Language.php.

Get the grammar forms for the content language.

Returns:
array Array of grammar forms
Since:
1.20

Definition at line 3718 of file Language.php.

Parameters:
string$key
Returns:
string

Definition at line 1014 of file Language.php.

Parameters:
string$key
Returns:
string

Definition at line 1022 of file Language.php.

Parameters:
string$key
Returns:
string

Definition at line 1030 of file Language.php.

Get the code in Bcp47 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

Definition at line 4171 of file Language.php.

Language::getHumanTimestamp ( MWTimestamp ts,
MWTimestamp relativeTo,
User user 
)

Convert an MWTimestamp into a pretty human-readable timestamp using the given user preferences and relative base time.

DO NOT USE THIS FUNCTION DIRECTLY. Instead, call MWTimestamp::getHumanTimestamp on your timestamp object, which will then call this function. Calling this function directly will cause hooks to be skipped over.

See also:
MWTimestamp::getHumanTimestamp
Parameters:
MWTimestamp$tsTimestamp to prettify
MWTimestamp$relativeToBase timestamp
User$userUser preferences to use
Returns:
string Human timestamp
Since:
1.22

Definition at line 2400 of file Language.php.

Language::getImageFile ( image)
Parameters:
string$image
Returns:
array|null

Definition at line 782 of file Language.php.

Returns:
array
Since:
1.24

Definition at line 790 of file Language.php.

Parameters:
string$key
Returns:
string

Definition at line 1006 of file Language.php.

static Language::getJsonMessagesFileName ( code) [static]
Parameters:
string$code
Returns:
string
Since:
1.23

Definition at line 4237 of file Language.php.

Deprecated:
since 1.24, will be removed in 1.25
Returns:
Language

Definition at line 4116 of file Language.php.

Get the native language name of $code.

Only if defined in MediaWiki, no other data like CLDR.

Parameters:
string$code
Returns:
string
Deprecated:
since 1.20, use fetchLanguageName()

Definition at line 936 of file Language.php.

static Language::getLanguageNames ( customisedOnly = false) [static]

Get native language names, indexed by code.

Only those defined in MediaWiki, no other data like CLDR. If $customisedOnly is true, only returns codes with a messages file

Parameters:
bool$customisedOnly
Returns:
array
Deprecated:
since 1.20, use fetchLanguageNames()

Definition at line 819 of file Language.php.

static Language::getLocalisationCache ( ) [static]

Get the LocalisationCache instance.

Returns:
LocalisationCache

Definition at line 409 of file Language.php.

Referenced by __construct(), and DeleteEqualMessages\fetchMessageInfo().

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

Definition at line 618 of file Language.php.

Language::getMagic ( mw)

Fill a MagicWord object with data from here.

Parameters:
MagicWord$mw

Definition at line 3138 of file Language.php.

Get all magic words from cache.

Returns:
array

Definition at line 3116 of file Language.php.

Parameters:
string$key
Returns:
array|null

Reimplemented in LanguageQqx.

Definition at line 2467 of file Language.php.

static Language::getMessageFor ( key,
code 
) [static]

Get a message for a given language.

Parameters:
string$key
string$code
Returns:
string

Definition at line 4344 of file Language.php.

Get a message from the MediaWiki namespace.

Parameters:
string$msgMessage name
Returns:
string

Definition at line 925 of file Language.php.

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)

Definition at line 4356 of file Language.php.

Referenced by ApiQueryAllMessages\execute().

static Language::getMessagesFileName ( code) [static]
Parameters:
string$code
Returns:
string

Definition at line 4225 of file Language.php.

Referenced by Digit2Html\execute(), and SpecialPageAliasTest\getSpecialPageAliases().

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

Definition at line 4332 of file Language.php.

Referenced by AllTrans\execute(), and DumpMessages\execute().

Parameters:
string$key
Returns:
string

Definition at line 971 of file Language.php.

Returns:
array

Definition at line 978 of file Language.php.

Parameters:
string$key
Returns:
string

Definition at line 944 of file Language.php.

Referenced by LanguageWa\date().

Parameters:
string$key
Returns:
string

Definition at line 963 of file Language.php.

Returns:
array

Definition at line 951 of file Language.php.

Returns:
array

Definition at line 627 of file Language.php.

Returns:
array

Definition at line 671 of file Language.php.

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

Definition at line 467 of file Language.php.

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

Definition at line 701 of file Language.php.

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

Definition at line 546 of file Language.php.

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

Definition at line 4128 of file Language.php.

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

Definition at line 4067 of file Language.php.

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

Definition at line 4758 of file Language.php.

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

Definition at line 4720 of file Language.php.

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

Definition at line 4772 of file Language.php.

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

Definition at line 4739 of file Language.php.

Returns:
string

Definition at line 4016 of file Language.php.

Referenced by LanguageKk\convertGrammar(), LanguageKk\lcfirst(), and LanguageKk\ucfirst().

Get special page names, as an associative array case folded alias => real name.

Returns:
array

Definition at line 3179 of file Language.php.

static Language::getTranslatedLanguageNames ( code) [static]

Get translated language names.

This is done on best effort and by default this is exactly the same as Language::getLanguageNames. The CLDR extension provides translated names.

Parameters:
string$codeLanguage code.
Returns:
array Language code => language name
Since:
1.18.0
Deprecated:
since 1.20, use fetchLanguageNames()

Definition at line 832 of file Language.php.

Returns:
string

Definition at line 4030 of file Language.php.

Parameters:
string$tog
Returns:
string

Definition at line 805 of file Language.php.

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

Definition at line 718 of file Language.php.

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

Returns:
array An array of language codes

Definition at line 4009 of file Language.php.

Parameters:
string$key
Returns:
string

Definition at line 998 of file Language.php.

Parameters:
string$key
Returns:
string

Definition at line 990 of file Language.php.

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

Definition at line 3806 of file Language.php.

Referenced by LanguageKsh\convertPlural().

Language::hasVariant ( variant)

Check if the language has the specific variant.

Since:
1.19
Parameters:
string$variant
Returns:
bool

Definition at line 3969 of file Language.php.

Check if this is a language with variants.

Returns:
bool

Definition at line 3958 of file Language.php.

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

Reimplemented in LanguageZh_hans, and LanguageYue.

Definition at line 2777 of file Language.php.

static Language::hebrewNumeral ( num) [static]

Hebrew Gematria number formatting up to 9999.

Parameters:
int$num
Returns:
string

Definition at line 1953 of file Language.php.

static Language::hebrewYearStart ( year) [static, private]

This calculates the Hebrew year start, as days since 1 September.

Based on Carl Friedrich Gauss algorithm for finding Easter date. Used for Hebrew date.

Parameters:
int$year
Returns:
string

Definition at line 1804 of file Language.php.

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

Reimplemented in LanguageEo.

Definition at line 2484 of file Language.php.

Hook which will be called if this is the content language.

Descendants can use this to register hook functions or modify globals

Definition at line 442 of file Language.php.

Reimplemented in LanguageEo.

Definition at line 2905 of file Language.php.

static Language::insertSpace ( string,
pattern 
) [static, protected]
Parameters:
string$string
string$pattern
Returns:
string

Definition at line 2831 of file Language.php.

Referenced by LanguageJa\segmentByWord(), LanguageYue\segmentByWord(), and LanguageZh_hans\segmentByWord().

Language::internalUserTimeAndDate ( type,
ts,
User user,
array options 
) [private]

Internal helper function for userDate(), userTime() and userTimeAndDate()

Parameters:
string$typeCan be 'date', 'time' or 'both'
string$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

Definition at line 2296 of file Language.php.

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

Definition at line 352 of file Language.php.

Referenced by SpecialMyLanguage\findTitle(), LanguageTest\testKnownCldrLanguageTag(), LanguageTest\testKnownLanguageTag(), and LanguageTest\testUnknownLanguageTag().

Parameters:
string$str
Returns:
bool

Definition at line 2655 of file Language.php.

For right-to-left language support.

Returns:
bool

Definition at line 2999 of file Language.php.

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

Definition at line 227 of file Language.php.

Referenced by ApiCreateAccount\execute(), and LanguageTest\testIsSupportedLanguage().

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

Definition at line 329 of file Language.php.

Referenced by LanguageTest\testBuiltInCodeValidation().

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

Definition at line 303 of file Language.php.

Referenced by ApiQuerySiteinfo\appendSkins(), and ApiQueryAllMessages\execute().

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

Definition at line 249 of file Language.php.

Referenced by LanguageTest\testLenientLanguageTag(), LanguageTest\testMalformedLanguageTag(), and LanguageTest\testWellFormedLanguageTag().

Language::lc ( str,
first = false 
)
Parameters:
string$str
bool$first
Returns:
mixed|string

Definition at line 2626 of file Language.php.

Language::lcCallback ( matches)
Parameters:
array$matches
Returns:
string

Definition at line 2529 of file Language.php.

Language::lcfirst ( str)
Parameters:
string$str
Returns:
mixed|string

Reimplemented in LanguageKk, LanguageKaa, and LanguageTr.

Definition at line 2607 of file Language.php.

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

Definition at line 4108 of file Language.php.

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

Returns:
bool

Definition at line 3108 of file Language.php.

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

Returns:
string

Definition at line 4098 of file Language.php.

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

Definition at line 3364 of file Language.php.

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

Definition at line 4083 of file Language.php.

Whether this language uses gender-dependent namespace aliases.

See https://www.mediawiki.org/wiki/Manual:$wgExtraGenderNamespaces

Returns:
bool
Since:
1.18

Definition at line 594 of file Language.php.

static Language::newFromCode ( code) [static, protected]

Create a language object for a given language code.

Parameters:
string$code
Exceptions:
MWException
Returns:
Language

Definition at line 176 of file Language.php.

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

Reimplemented in LanguageMl, and LanguageAr.

Definition at line 2958 of file Language.php.

Some languages have special punctuation need to be normalized.

Make such changes here.

Parameters:
string$string
Returns:
string

Reimplemented in LanguageZh_hans, LanguageYue, and LanguageBe_tarask.

Definition at line 2799 of file Language.php.

Language::numLink ( Title title,
offset,
limit,
array query,
link,
tooltipMsg,
class 
) [private]

Helper function for viewPrevNext() that generates links.

Parameters:
Title$titleTitle object to link
int$offset
int$limit
array$queryExtra query parameters
string$linkText to use for the link; will be escaped
string$tooltipMsgName of the message to use as tooltip
string$classValue of the "class" attribute of the link
Returns:
string HTML fragment

Definition at line 4676 of file Language.php.

Parameters:
string$number
Returns:
string

Definition at line 3260 of file Language.php.

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

Parameters:
string[]$list Array of strings to put in a pipe list
Returns:
string

Definition at line 3418 of file Language.php.

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

Definition at line 3827 of file Language.php.

Referenced by LanguageKsh\convertPlural().

static Language::preloadLanguageClass ( class) [static]

Includes language class files.

Parameters:
string$className of the language class

Definition at line 392 of file Language.php.

Parameters:
string$s
Returns:
string

Definition at line 2916 of file Language.php.

Parameters:
string$s
Returns:
string

Definition at line 2932 of file Language.php.

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

Definition at line 3516 of file Language.php.

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

Definition at line 3491 of file Language.php.

Parameters:
string$m
Returns:
string

Definition at line 4385 of file Language.php.

Resets all of the namespace caches.

Mainly used for testing

Definition at line 514 of file Language.php.

static Language::romanNumeral ( num) [static]

Roman number formatting up to 10000.

Parameters:
int$num
Returns:
string

Definition at line 1922 of file Language.php.

Referenced by LanguageTest\testRomanNumerals().

Language::segmentByWord ( string)

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

Parameters:
string$string
Returns:
string

Reimplemented in LanguageZh_hans, LanguageYue, and LanguageJa.

Definition at line 2788 of file Language.php.

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

Parameters:
string$text
Returns:
string

Reimplemented in LanguageZh.

Definition at line 3889 of file Language.php.

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

Definition at line 3406 of file Language.php.

Returns:
array

Definition at line 3351 of file Language.php.

Language::setCode ( code)
Parameters:
string$code

Definition at line 4181 of file Language.php.

Language::setNamespaces ( array namespaces)

Arbitrarily set all of the namespace names at once.

Mainly used for testing

Parameters:
array$namespacesArray of namespaces (id => name)

Definition at line 506 of file Language.php.

Language::specialList ( page,
details,
oppositedm = true 
)

Make a list item, used by various special pages.

Parameters:
string$pagePage link
string$detailsText between brackets
bool$oppositedmAdd the direction mark opposite to your language, to display text properly
Returns:
string

Definition at line 4612 of file Language.php.

Language::specialPage ( name)
Parameters:
string$name
Returns:
string

Definition at line 736 of file Language.php.

Language::sprintfDate ( format,
ts,
DateTimeZone $  zone = null,
&$  ttl = null 
)

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

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
[out]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

Definition at line 1118 of file Language.php.

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

Definition at line 2180 of file Language.php.

Referenced by LanguageWa\timeanddate().

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

Reimplemented in LanguageWa.

Definition at line 2200 of file Language.php.

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

Definition at line 2983 of file Language.php.

Referenced by LanguageAr\normalize(), and LanguageMl\normalize().

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
Returns:
string Somehow translated block duration
See also:
LanguageFi.php for example implementation

Definition at line 3845 of file Language.php.

Language::truncate ( string,
length,
ellipsis = '...',
adjustLength = true 
)

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

for ellipses)

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

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

Parameters:
string$stringString to truncate
int$lengthMaximum length (including ellipses)
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

Definition at line 3442 of file Language.php.

Language::truncate_endBracket ( &$  tag,
tagType,
lastCh,
&$  openTags 
) [private]

truncateHtml() helper function (a) push or pop $tag from $openTags as needed (b) clear $tag value

Parameters:
string&$tagCurrent HTML tag name we are looking at
int$tagType(0-open tag, 1-close tag)
string$lastChCharacter before the '>' that ended this tag
array&$openTagsOpen tag stack (not accounting for $tag)

Definition at line 3683 of file Language.php.

Language::truncate_skip ( &$  ret,
text,
search,
start,
len = null 
) [private]

truncateHtml() helper function like strcspn() but adds the skipped chars to $ret

Parameters:
string$ret
string$text
string$search
int$start
null | int$len
Returns:
int

Definition at line 3660 of file Language.php.

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

Definition at line 3542 of file Language.php.

static Language::tsToHebrew ( ts) [static, private]

Converting Gregorian dates to Hebrew dates.

Based on a JavaScript code by Abu Mami and Yisrael Hersch ([email protected], http://www.kaluach.net), who permitted to translate the relevant functions into PHP and release them under GNU GPL.

The months are counted from Tishrei = 1. In a leap year, Adar I is 13 and Adar II is 14. In a non-leap year, Adar is 6.

Parameters:
string$ts
Returns:
string

Definition at line 1663 of file Language.php.

static Language::tsToHijri ( ts) [static, private]

Converting Gregorian dates to Hijri dates.

Based on a PHP-Nuke block by Sharjeel which is released under GNU/GPL license

See also:
http://phpnuke.org/modules.php?name=News&file=article&sid=8234&mode=thread&order=0&thold=0
Parameters:
string$ts
Returns:
string

Definition at line 1611 of file Language.php.

static Language::tsToIranian ( ts) [static, private]

Algorithm by Roozbeh Pournader and Mohammad Toossi to convert Gregorian dates to Iranian dates.

Originally written in C, it is released under the terms of GNU Lesser General Public License. Conversion to PHP was performed by Niklas Laxström.

Link: http://www.farsiweb.info/jalali/jalali.c

Parameters:
string$ts
Returns:
string

Definition at line 1553 of file Language.php.

static Language::tsToYear ( ts,
cName 
) [static, private]

Algorithm to convert Gregorian dates to Thai solar dates, Minguo dates or Minguo dates.

Link: http://en.wikipedia.org/wiki/Thai_solar_calendar http://en.wikipedia.org/wiki/Minguo_calendar http://en.wikipedia.org/wiki/Japanese_era_name

Parameters:
string$ts14-character timestamp
string$cNameCalender name
Returns:
array Converted year, month, day

Definition at line 1842 of file Language.php.

Language::uc ( str,
first = false 
)

Convert a string to uppercase.

Parameters:
string$str
bool$first
Returns:
string

Definition at line 2578 of file Language.php.

Language::ucCallback ( matches)
Parameters:
array$matches
Returns:
string

Definition at line 2520 of file Language.php.

Language::ucfirst ( str)

Make a string's first character uppercase.

Parameters:
string$str
Returns:
string

Reimplemented in LanguageKk, LanguageKaa, LanguageTr, and LanguageAz.

Definition at line 2558 of file Language.php.

capitalize words at word breaks

Parameters:
string$str
Returns:
mixed

Definition at line 2695 of file Language.php.

Parameters:
array$matches
Returns:
mixed|string

Definition at line 2504 of file Language.php.

Parameters:
array$matches
Returns:
string

Definition at line 2512 of file Language.php.

Language::ucwords ( str)
Parameters:
string$str
Returns:
mixed|string

Definition at line 2663 of file Language.php.

Parameters:
array$matches
Returns:
string

Definition at line 2538 of file Language.php.

Parameters:
array$matches
Returns:
string

Definition at line 2546 of file Language.php.

and unsegment to show the result

Parameters:
string$text
Returns:
string

Reimplemented in LanguageZh.

Definition at line 3899 of file Language.php.

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

Definition at line 2017 of file Language.php.

Referenced by LanguageWa\date(), and LanguageWa\timeanddate().

Language::userDate ( ts,
User user,
array options = array() 
)

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

Definition at line 2335 of file Language.php.

Language::userTime ( ts,
User user,
array options = array() 
)

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

Definition at line 2358 of file Language.php.

Language::userTimeAndDate ( ts,
User user,
array options = array() 
)

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

Definition at line 2381 of file Language.php.

Language::viewPrevNext ( Title title,
offset,
limit,
array query = array(),
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

Definition at line 4630 of file Language.php.


Member Data Documentation

Language::$dataCache [static]

Definition at line 63 of file Language.php.

Language::$dateFormatStrings = array()

Definition at line 50 of file Language.php.

Language::$durationIntervals [static]
Initial value:
 array(
        'millennia' => 31556952000,
        'centuries' => 3155695200,
        'decades' => 315569520,
        'years' => 31556952, 
        'weeks' => 604800,
        'days' => 86400,
        'hours' => 3600,
        'minutes' => 60,
        'seconds' => 1,
    )

Definition at line 125 of file Language.php.

Language::$fallbackLanguageCache = array() [static, private]

Definition at line 143 of file Language.php.

Language::$GREG_DAYS = array( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ) [static, private]

Definition at line 1538 of file Language.php.

Language::$IRANIAN_DAYS = array( 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29 ) [static, private]

Definition at line 1539 of file Language.php.

Language::$mCode

Definition at line 46 of file Language.php.

LanguageConverter Language::$mConverter

Definition at line 44 of file Language.php.

Language::$mExtendedSpecialPageAliases

Definition at line 51 of file Language.php.

Language::$mHebrewCalendarMonthGenMsgs [static]
Initial value:
 array(
        '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'
    )

Definition at line 106 of file Language.php.

Language::$mHebrewCalendarMonthMsgs [static]
Initial value:
 array(
        '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'
    )

Definition at line 98 of file Language.php.

Language::$mHijriCalendarMonthMsgs [static]
Initial value:
 array(
        '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'
    )

Definition at line 114 of file Language.php.

Language::$mHtmlCode = null [private]

Definition at line 48 of file Language.php.

Language::$mIranianCalendarMonthMsgs [static]
Initial value:
 array(
        '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'
    )

Definition at line 91 of file Language.php.

Language::$mLangObjCache = array() [static]

Definition at line 65 of file Language.php.

Language::$mLoaded = false

Definition at line 46 of file Language.php.

Language::$mMagicExtensions = array()

Definition at line 47 of file Language.php.

Language::$mMagicHookDone = false

Definition at line 47 of file Language.php.

Language::$mMonthAbbrevMsgs [static]
Initial value:
 array(
        'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug',
        'sep', 'oct', 'nov', 'dec'
    )

Definition at line 86 of file Language.php.

Language::$mMonthGenMsgs [static]
Initial value:
 array(
        'january-gen', 'february-gen', 'march-gen', 'april-gen', 'may-gen', 'june-gen',
        'july-gen', 'august-gen', 'september-gen', 'october-gen', 'november-gen',
        'december-gen'
    )

Definition at line 81 of file Language.php.

Language::$mMonthMsgs [static]
Initial value:
 array(
        'january', 'february', 'march', 'april', 'may_long', 'june',
        'july', 'august', 'september', 'october', 'november',
        'december'
    )

Definition at line 76 of file Language.php.

Language::$mNamespaceIds

Definition at line 53 of file Language.php.

Language::$mParentLanguage = false

Definition at line 48 of file Language.php.

Language::$mVariants

Definition at line 46 of file Language.php.

Language::$mWeekdayAbbrevMsgs [static]
Initial value:
 array(
        'sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'
    )

Definition at line 72 of file Language.php.

Language::$mWeekdayMsgs [static]
Initial value:
 array(
        'sunday', 'monday', 'tuesday', 'wednesday', 'thursday',
        'friday', 'saturday'
    )

Definition at line 67 of file Language.php.

Language::$namespaceAliases

Definition at line 53 of file Language.php.

Language::$namespaceNames [protected]

Definition at line 53 of file Language.php.

Language::$transformData = array()

ReplacementArray object caches.

Definition at line 58 of file Language.php.


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