Inherited by LanguageAm, LanguageAr, LanguageAz, LanguageBat_smg, LanguageBe, LanguageBe_tarask, LanguageBg, LanguageBh, LanguageBs, LanguageCs, LanguageCu, LanguageCy, LanguageDsb, LanguageEo, LanguageEt, LanguageFi, LanguageFr, LanguageGa, LanguageGd, LanguageGv, LanguageHe, LanguageHi, LanguageHr, LanguageHsb, LanguageHu, LanguageHy, LanguageJa, LanguageKaa, LanguageKk_cyrl, LanguageKm, LanguageKsh, LanguageKu_ku, LanguageLa, LanguageLn, LanguageLt, LanguageLv, LanguageMg, LanguageMk, LanguageMl, LanguageMo, LanguageMt, LanguageMy, LanguageNso, LanguagePl, LanguagePt_br, LanguageRo, LanguageRu, LanguageSe, LanguageSh, LanguageSk, LanguageSl, LanguageSma, LanguageSr_ec, LanguageSr_el, LanguageTest, LanguageTg, LanguageTi, LanguageTl, LanguageTr, LanguageTyv, LanguageUk, LanguageWa, LanguageYue, and LanguageZh_hans.
Public Member Functions | |
__construct () | |
__destruct () | |
Reduce memory usage. | |
initContLang () | |
Hook which will be called if this is the content language. | |
getDefaultUserOptions () | |
getFallbackLanguageCode () | |
getBookstoreList () | |
Exports $wgBookstoreListEn. | |
getNamespaces () | |
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. | |
getNsText ($index) | |
Get a namespace value by key $mw_ns = $wgContLang->getNsText( NS_MEDIAWIKI ); echo $mw_ns; // prints 'MediaWiki' . | |
getFormattedNsText ($index) | |
A convenience function that returns the same thing as getNsText() except with '_' changed to ' ', useful for producing output. | |
getLocalNsIndex ($text) | |
Get a namespace key by value, case insensitive. | |
getNamespaceAliases () | |
getNamespaceIds () | |
getNsIndex ($text) | |
Get a namespace key by value, case insensitive. | |
getVariantname ($code) | |
short names for language variants used for language conversion links. | |
specialPage ($name) | |
getQuickbarSettings () | |
getMathNames () | |
getDatePreferences () | |
getDateFormats () | |
getDefaultDateFormat () | |
getDatePreferenceMigrationMap () | |
getImageFile ($image) | |
getDefaultUserOptionOverrides () | |
getExtraUserToggles () | |
getUserToggle ($tog) | |
getMessageFromDB ($msg) | |
Get a message from the MediaWiki namespace. | |
getLanguageName ($code) | |
getMonthName ($key) | |
getMonthNameGen ($key) | |
getMonthAbbreviation ($key) | |
getWeekdayName ($key) | |
getWeekdayAbbreviation ($key) | |
getIranianCalendarMonthName ($key) | |
getHebrewCalendarMonthName ($key) | |
getHebrewCalendarMonthNameGen ($key) | |
getHijriCalendarMonthName ($key) | |
userAdjust ($ts, $tz=false) | |
Used by date() and time() to adjust the time output. | |
sprintfDate ($format, $ts) | |
This is a workalike of PHP's date() function, but with better internationalisation, a reduced set of format characters, and a better escaping format. | |
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. | |
getDateFormatString ($type, $pref) | |
Get a format string for a given type and preference. | |
date ($ts, $adj=false, $format=true, $timecorrection=false) | |
time ($ts, $adj=false, $format=true, $timecorrection=false) | |
timeanddate ($ts, $adj=false, $format=true, $timecorrection=false) | |
getMessage ($key) | |
getAllMessages () | |
iconv ($in, $out, $string) | |
ucwordbreaksCallbackAscii ($matches) | |
ucwordbreaksCallbackMB ($matches) | |
ucCallback ($matches) | |
lcCallback ($matches) | |
ucwordsCallbackMB ($matches) | |
ucwordsCallbackWiki ($matches) | |
ucfirst ($str) | |
uc ($str, $first=false) | |
lcfirst ($str) | |
lc ($str, $first=false) | |
isMultibyte ($str) | |
ucwords ($str) | |
ucwordbreaks ($str) | |
caseFold ($s) | |
Return a case-folded representation of $s. | |
checkTitleEncoding ($s) | |
fallback8bitEncoding () | |
hasWordBreaks () | |
Most writing systems use whitespace to break up words. | |
wordSegmentation ($string) | |
Some languages such as Chinese require word segmentation, Specify such segmentation when overridden in derived class. | |
normalizeForSearch ($string) | |
Some languages have special punctuation need to be normalized. | |
convertForSearchResult ($termsArray) | |
firstChar ($s) | |
Get the first character of a string. | |
initEncoding () | |
recodeForEdit ($s) | |
recodeInput ($s) | |
normalize ($s) | |
Convert a UTF-8 string to normal form C. | |
transformUsingPairFile ($file, $string) | |
Transform a string using serialized data stored in the given file (which must be in the serialized subdirectory of $IP). | |
isRTL () | |
For right-to-left language support. | |
getDir () | |
Return the correct HTML 'dir' attribute value for this language. | |
alignStart () | |
Return 'left' or 'right' as appropriate alignment for line-start for this language's text direction. | |
alignEnd () | |
Return 'right' or 'left' as appropriate alignment for line-end for this language's text direction. | |
getDirMark () | |
A hidden direction mark (LRM or RLM), depending on the language direction. | |
capitalizeAllNouns () | |
getArrow () | |
An arrow, depending on the language direction. | |
linkPrefixExtension () | |
To allow "foo[[bar]]" to extend the link over the whole word "foobar". | |
getMagicWords () | |
getMagic ($mw) | |
addMagicWordsByLang ($newWords) | |
Add magic words to the extension array. | |
getSpecialPageAliases () | |
Get special page names, as an associative array case folded alias => real name. | |
emphasize ($text) | |
Italic is unsuitable for some languages. | |
formatNum ($number, $nocommafy=false) | |
Normally we output all numbers in plain en_US style, that is 293,291.235 for twohundredninetythreethousand-twohundredninetyone point twohundredthirtyfive. | |
parseFormattedNumber ($number) | |
commafy ($_) | |
Adds commas to a given number. | |
digitTransformTable () | |
separatorTransformTable () | |
listToText ($l) | |
Take a list of strings and build a locale-friendly comma-separated list, using the local comma-separator message. | |
commaList ($list) | |
Take a list of strings and build a locale-friendly comma-separated list, using the local comma-separator message. | |
semicolonList ($list) | |
Take a list of strings and build a locale-friendly semicolon-separated list, using the local semicolon-separator message. | |
pipeList ($list) | |
Same as commaList, but separate it with the pipe instead. | |
truncate ($string, $length, $ellipsis= '...') | |
Truncate a string to a specified length in bytes, appending an optional string (e.g. | |
convertGrammar ($word, $case) | |
Grammatical transformations, needed for inflected languages Invoked by putting {{grammar:case|word}} in a message. | |
gender ($gender, $forms) | |
Provides an alternative text depending on specified gender. | |
convertPlural ($count, $forms) | |
Plural form transformations, needed for some languages. | |
translateBlockExpiry ($str) | |
For translaing of expiry times. | |
segmentForDiff ($text) | |
languages like Chinese need to be segmented in order for the diff to be of any use | |
unsegmentForDiff ($text) | |
and unsegment to show the result | |
autoConvertToAllVariants ($text) | |
convert ($text) | |
convertTitle ($title) | |
hasVariants () | |
armourMath ($text) | |
convertHtml ($text, $isTitle=false) | |
Perform output conversion on a string, and encode for safe HTML output. | |
convertCategoryKey ($key) | |
getVariants () | |
get the list of variants supported by this langauge see sample implementation in LanguageZh.php | |
getPreferredVariant ($fromUser=true, $fromHeader=false) | |
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. | |
convertLinkToAllVariants ($text) | |
If a language supports multiple variants, converts text into an array of all possible variants of the text: 'variant' => text in that variant. | |
getExtraHashOptions () | |
returns language specific options used by User::getPageRenderHash() for example, the preferred language variant | |
getParsedTitle () | |
for languages that support multiple variants, the title of an article may be displayed differently in different variants. | |
markNoConversion ($text, $noParse=false) | |
Enclose a string with the "no conversion" tag. | |
linkTrail () | |
A regular expression to match legal word-trailing characters which should be merged onto a link of the form [[foo]]bar. | |
getLangObj () | |
getCode () | |
Get the RFC 3066 code for this language object. | |
setCode ($code) | |
fixVariableInNamespace ($talk) | |
replaceGrammarInNamespace ($m) | |
formatTimePeriod ($seconds) | |
formatBitrate ($bps) | |
formatSize ($size) | |
Format a size in bytes for output, using an appropriate unit (B, KB, MB or GB) according to the magnitude in question. | |
getConvRuleTitle () | |
Get the conversion rule title, if any. | |
Static Public Member Functions | |
static | factory ($code) |
Get a cached language object for a given language code. | |
static | isValidCode ($code) |
Returns true if a language code string is of a valid form, whether or not it exists. | |
static | getLocalisationCache () |
Get the LocalisationCache instance. | |
static | getLanguageNames ($customisedOnly=false) |
Get language names, indexed by code. | |
static | romanNumeral ($num) |
Roman number formatting up to 3000. | |
static | hebrewNumeral ($num) |
Hebrew Gematria number formatting up to 9999. | |
static | getFileName ($prefix= 'Language', $code, $suffix= '.php') |
Get the name of a file for a certain language code. | |
static | getCodeFromFileName ($filename, $prefix= 'Language', $suffix= '.php') |
Get the language code from a file name. | |
static | getMessagesFileName ($code) |
static | getClassFileName ($code) |
static | getFallbackFor ($code) |
Get the fallback for a given language. | |
static | getMessagesFor ($code) |
Get all messages for a given language WARNING: this may take a long time. | |
static | getMessageFor ($key, $code) |
Get a message for a given language. | |
static | getCaseMaps () |
Public Attributes | |
$mConverter | |
$mVariants | |
$mCode | |
$mLoaded = false | |
$mMagicExtensions = array() | |
$mMagicHookDone = false | |
$mNamespaceIds | |
$namespaceNames | |
$namespaceAliases | |
$dateFormatStrings = array() | |
$mExtendedSpecialPageAliases | |
$transformData = array() | |
ReplacementArray object caches. | |
Static Public Attributes | |
static | $dataCache |
static | $mLangObjCache = array() |
static | $mWeekdayMsgs |
static | $mWeekdayAbbrevMsgs |
static | $mMonthMsgs |
static | $mMonthGenMsgs |
static | $mMonthAbbrevMsgs |
static | $mIranianCalendarMonthMsgs |
static | $mHebrewCalendarMonthMsgs |
static | $mHebrewCalendarMonthGenMsgs |
static | $mHijriCalendarMonthMsgs |
Protected Member Functions | |
preConvertPlural ($forms, $count) | |
Checks that convertPlural was given an array and pads it to requested amound of forms by copying the last one. | |
Static Protected Member Functions | |
static | newFromCode ($code) |
Create a language object for a given language code. | |
static | convertDoubleWidth ($string) |
convert double-width roman characters to single-width. | |
static | insertSpace ($string, $pattern) |
Static Private Member Functions | |
static | tsToIranian ($ts) |
Algorithm by Roozbeh Pournader and Mohammad Toossi to convert Gregorian dates to Iranian dates. | |
static | tsToHijri ($ts) |
Converting Gregorian dates to Hijri dates. | |
static | tsToHebrew ($ts) |
Converting Gregorian dates to Hebrew dates. | |
static | hebrewYearStart ($year) |
This calculates the Hebrew year start, as days since 1 September. | |
static | tsToYear ($ts, $cName) |
Algorithm to convert Gregorian dates to Thai solar dates, Minguo dates or Minguo dates. | |
Static Private Attributes | |
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 ) |
Definition at line 57 of file Language.php.
Language::__construct | ( | ) |
Reimplemented in LanguageGan, LanguageKk, LanguageKu, LanguageSr, LanguageTg, LanguageZh, and LanguageTest.
Definition at line 204 of file Language.php.
References getLocalisationCache().
Language::__destruct | ( | ) |
Language::addMagicWordsByLang | ( | $ | newWords | ) |
Add magic words to the extension array.
Definition at line 1979 of file Language.php.
References $code, getCode(), and getFallbackFor().
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....
Definition at line 1910 of file Language.php.
References isRTL().
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....
Definition at line 1898 of file Language.php.
References isRTL().
Language::armourMath | ( | $ | text | ) |
Definition at line 2354 of file Language.php.
Language::autoConvertToAllVariants | ( | $ | text | ) |
Definition at line 2334 of file Language.php.
Language::capitalizeAllNouns | ( | ) |
Definition at line 1923 of file Language.php.
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.
Definition at line 1674 of file Language.php.
Language::checkTitleEncoding | ( | $ | s | ) |
Reimplemented in LanguageEo.
Definition at line 1678 of file Language.php.
References $s, fallback8bitEncoding(), iconv(), and wfDebugDieBacktrace().
Language::commafy | ( | $ | _ | ) |
Adds commas to a given number.
$_ | mixed |
Reimplemented in LanguageBg, LanguageEt, LanguageHy, LanguageKaa, LanguageKk_cyrl, LanguageKm, LanguageKsh, LanguageKu_ku, LanguageMy, LanguagePl, LanguageRu, and LanguageUk.
Definition at line 2081 of file Language.php.
Referenced by formatNum().
Language::commaList | ( | $ | list | ) |
Take a list of strings and build a locale-friendly comma-separated list, using the local comma-separator message.
$list | array of strings to put in a comma list |
Definition at line 2128 of file Language.php.
References wfMsgExt().
Language::convert | ( | $ | text | ) |
Language::convertCategoryKey | ( | $ | key | ) |
Definition at line 2370 of file Language.php.
static Language::convertDoubleWidth | ( | $ | string | ) | [static, protected] |
convert double-width roman characters to single-width.
range: ff00-ff5f ~= 0020-007f
Definition at line 1733 of file Language.php.
Referenced by LanguageZh::convertForSearchResult(), LanguageGan::convertForSearchResult(), LanguageZh_hans::normalizeForSearch(), LanguageYue::normalizeForSearch(), and LanguageJa::normalizeForSearch().
Language::convertForSearchResult | ( | $ | termsArray | ) |
Language::convertGrammar | ( | $ | word, | |
$ | case | |||
) |
Grammatical transformations, needed for inflected languages Invoked by putting {{grammar:case|word}} in a message.
$word | string | |
$case | string |
Reimplemented in LanguageBs, LanguageCu, LanguageDsb, LanguageFi, LanguageGa, LanguageHe, LanguageHsb, LanguageHu, LanguageHy, LanguageKaa, LanguageKk, LanguageLa, LanguageRu, LanguageSl, LanguageTyv, and LanguageUk.
Definition at line 2225 of file Language.php.
References $wgGrammarForms, and getCode().
Referenced by replaceGrammarInNamespace().
Language::convertHtml | ( | $ | text, | |
$ | isTitle = false | |||
) |
Perform output conversion on a string, and encode for safe HTML output.
$text | String text to be converted | |
$isTitle | Bool whether this conversion is for the article title |
Definition at line 2366 of file Language.php.
References convert().
Language::convertLinkToAllVariants | ( | $ | text | ) |
If a language supports multiple variants, converts text into an array of all possible variants of the text: 'variant' => text in that variant.
Definition at line 2410 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}}
$count | Integer: non-localized number | |
$forms | Array: different plural forms |
Reimplemented in LanguageAm, LanguageAr, LanguageBat_smg, LanguageBe, LanguageBe_tarask, LanguageBh, LanguageBs, LanguageCs, LanguageCu, LanguageCy, LanguageDsb, LanguageFr, LanguageGa, LanguageGd, LanguageGv, LanguageHe, LanguageHi, LanguageHr, LanguageHsb, LanguageHy, LanguageKsh, LanguageLn, LanguageLt, LanguageLv, LanguageMg, LanguageMk, LanguageMo, LanguageMt, LanguageNso, LanguagePl, LanguagePt_br, LanguageRo, LanguageRu, LanguageSe, LanguageSh, LanguageSk, LanguageSl, LanguageSma, LanguageSr, LanguageSr_ec, LanguageSr_el, LanguageTi, LanguageTl, LanguageUk, and LanguageWa.
Definition at line 2264 of file Language.php.
References preConvertPlural().
Language::convertTitle | ( | $ | title | ) |
Language::date | ( | $ | ts, | |
$ | adj = false , |
|||
$ | format = true , |
|||
$ | timecorrection = false | |||
) |
$ts | Mixed: the time format which needs to be turned into a date('YmdHis') format with wfTimestamp(TS_MW,$ts) | |
$adj | Bool: whether to adjust the time output according to the user configured offset ($timecorrection) | |
$format | Mixed: true to use user's date format preference | |
$timecorrection | String: the time offset as returned by validateTimeZone() in Special:Preferences |
Reimplemented in LanguageWa.
Definition at line 1433 of file Language.php.
References dateFormat(), getDateFormatString(), sprintfDate(), and userAdjust().
Referenced by sprintfDate(), LanguageFi::translateBlockExpiry(), and userAdjust().
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); [...] }
$usePrefs | Mixed: if true, the user's preference is used if false, the site/language default is used if int/string, assumed to be a format. |
Definition at line 1379 of file Language.php.
References $options, $wgUser, and User::getDefaultOptions().
Referenced by date(), LanguageWa::date(), time(), timeanddate(), and LanguageWa::timeanddate().
Language::digitTransformTable | ( | ) |
Definition at line 2085 of file Language.php.
Referenced by formatNum(), and parseFormattedNumber().
Language::emphasize | ( | $ | text | ) |
Italic is unsuitable for some languages.
$text | String: the text to be emphasized. |
Reimplemented in LanguageJa.
Definition at line 2020 of file Language.php.
static Language::factory | ( | $ | code | ) | [static] |
Get a cached language object for a given language code.
Definition at line 130 of file Language.php.
References $code, and newFromCode().
Referenced by StubUserLang::_newObject(), StubContLang::_newObject(), LangMemUsage::execute(), DateFormats::execute(), ApiQueryAllmessages::execute(), LoginForm::processLogin(), RevisionTest::setUp(), LanguageConverterTest::setUp(), ApiSetup::setup(), ParserTest::setupGlobals(), LanguageConverterTest::testGetPreferredVariantDefaultLanguageVsUrlVariant(), LanguageConverterTest::testGetPreferredVariantHeaderUserVsUrl(), TimeAdjustTest::testUserAdjust(), and wfGetLangObj().
Language::fallback8bitEncoding | ( | ) |
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
$link | String: the name of the link | |
$nt | Mixed: the title object of the link | |
boolean | $ignoreOtherCond: to disable other conditions when we need to transclude a template or update a category's link |
Definition at line 2401 of file Language.php.
Language::firstChar | ( | $ | s | ) |
Get the first character of a string.
$s | string |
Definition at line 1757 of file Language.php.
References $code, $s, and utf8ToCodepoint().
Language::fixVariableInNamespace | ( | $ | talk | ) |
Definition at line 2545 of file Language.php.
References $wgMetaNamespace.
Referenced by getNamespaceAliases(), and getNamespaces().
Language::formatBitrate | ( | $ | bps | ) |
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 sutable for all languages, some such as Pakaran 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: wfMsg( 'message', $wgLang->formatNum( $num ) )
See LanguageGu.php for the Gujarati implementation and $separatorTransformTable on MessageIs.php for the , => . and . => , implementation.
$number | Mixed: the string to be formatted, should be an integer or a floating point number. | |
$nocommafy | Bool: set to true for special numbers like dates |
Definition at line 2048 of file Language.php.
References $s, $wgTranslateNumerals, commafy(), digitTransformTable(), and separatorTransformTable().
Referenced by formatBitrate(), formatSize(), formatTimePeriod(), and sprintfDate().
Language::formatSize | ( | $ | size | ) |
Format a size in bytes for output, using an appropriate unit (B, KB, MB or GB) according to the magnitude in question.
$size | Size to format |
Definition at line 2621 of file Language.php.
References $msg, $size, formatNum(), and getMessageFromDB().
Language::formatTimePeriod | ( | $ | seconds | ) |
Language::gender | ( | $ | gender, | |
$ | forms | |||
) |
Provides an alternative text depending on specified gender.
Usage {{gender:username|masculine|feminine|neutral}}. 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 second or third parameter are not specified, masculine is used. These details may be overriden per language.
Definition at line 2241 of file Language.php.
References preConvertPlural().
Language::getAllMessages | ( | ) |
Definition at line 1483 of file Language.php.
Language::getArrow | ( | ) |
An arrow, depending on the language direction.
Definition at line 1932 of file Language.php.
References isRTL().
Language::getBookstoreList | ( | ) |
static Language::getCaseMaps | ( | ) | [static] |
Definition at line 2564 of file Language.php.
References $wikiLowerChars, $wikiUpperChars, wfGetPrecompiledData(), wfProfileIn(), and wfProfileOut().
Referenced by lc(), lcCallback(), uc(), ucCallback(), and ucwordsCallbackWiki().
static Language::getClassFileName | ( | $ | code | ) | [static] |
Language::getCode | ( | ) |
Get the RFC 3066 code for this language object.
Definition at line 2465 of file Language.php.
Referenced by addMagicWordsByLang(), convertGrammar(), LanguageHu::convertGrammar(), getMagic(), and getSpecialPageAliases().
static Language::getCodeFromFileName | ( | $ | filename, | |
$ | prefix = 'Language' , |
|||
$ | suffix = '.php' | |||
) | [static] |
Get the language code from a file name.
Inverse of getFileName()
$filename | string $prefix . $languageCode . $suffix | |
$prefix | string Prefix before the language code | |
$suffix | string Suffix after the language code |
Definition at line 2498 of file Language.php.
References $filename.
Referenced by getLanguageNames().
Language::getConvRuleTitle | ( | ) |
Language::getDateFormats | ( | ) |
Definition at line 435 of file Language.php.
Language::getDateFormatString | ( | $ | type, | |
$ | pref | |||
) |
Get a format string for a given type and preference.
$type | May be date, time or both | |
$pref | The format name as it appears in Messages*.php |
Definition at line 1406 of file Language.php.
References getDefaultDateFormat().
Referenced by date(), time(), and timeanddate().
Language::getDatePreferenceMigrationMap | ( | ) |
Definition at line 449 of file Language.php.
Language::getDatePreferences | ( | ) |
Definition at line 431 of file Language.php.
Language::getDefaultDateFormat | ( | ) |
Definition at line 439 of file Language.php.
References $wgAmericanDates.
Referenced by getDateFormatString().
Language::getDefaultUserOptionOverrides | ( | ) |
Definition at line 457 of file Language.php.
Language::getDefaultUserOptions | ( | ) |
Definition at line 234 of file Language.php.
References User::getDefaultOptions(), and wfDeprecated().
Language::getDir | ( | ) |
Return the correct HTML 'dir' attribute value for this language.
Definition at line 1886 of file Language.php.
References isRTL().
Language::getDirMark | ( | ) |
A hidden direction mark (LRM or RLM), depending on the language direction.
Definition at line 1919 of file Language.php.
References isRTL().
Language::getExtraHashOptions | ( | ) |
returns language specific options used by User::getPageRenderHash() for example, the preferred language variant
Definition at line 2421 of file Language.php.
Language::getExtraUserToggles | ( | ) |
Definition at line 461 of file Language.php.
static Language::getFallbackFor | ( | $ | code | ) | [static] |
Get the fallback for a given language.
Definition at line 2521 of file Language.php.
References $code, and getLocalisationCache().
Referenced by addMagicWordsByLang(), and newFromCode().
Language::getFallbackLanguageCode | ( | ) |
Definition at line 239 of file Language.php.
static Language::getFileName | ( | $ | prefix = 'Language' , |
|
$ | code, | |||
$ | suffix = '.php' | |||
) | [static] |
Get the name of a file for a certain language code.
$prefix | string Prepend this to the filename | |
$code | string Language code | |
$suffix | string Append this to the filename |
Definition at line 2480 of file Language.php.
References $code, isValidCode(), and ucfirst().
Referenced by getClassFileName(), and getMessagesFileName().
Language::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.
in <select> forms.
Definition at line 291 of file Language.php.
References getNamespaces().
Language::getFormattedNsText | ( | $ | index | ) |
A convenience function that returns the same thing as getNsText() except with '_' changed to ' ', useful for producing output.
Definition at line 321 of file Language.php.
References getNsText().
Language::getHebrewCalendarMonthName | ( | $ | key | ) |
Definition at line 535 of file Language.php.
References getMessageFromDB().
Referenced by sprintfDate().
Language::getHebrewCalendarMonthNameGen | ( | $ | key | ) |
Definition at line 539 of file Language.php.
References getMessageFromDB().
Referenced by sprintfDate().
Language::getHijriCalendarMonthName | ( | $ | key | ) |
Definition at line 543 of file Language.php.
References getMessageFromDB().
Referenced by sprintfDate().
Language::getImageFile | ( | $ | image | ) |
Definition at line 453 of file Language.php.
Language::getIranianCalendarMonthName | ( | $ | key | ) |
Definition at line 531 of file Language.php.
References getMessageFromDB().
Referenced by sprintfDate().
Language::getLangObj | ( | ) |
Definition at line 2458 of file Language.php.
Language::getLanguageName | ( | $ | code | ) |
static Language::getLanguageNames | ( | $ | customisedOnly = false |
) | [static] |
Get language names, indexed by code.
If $customisedOnly is true, only returns codes with a messages file
Definition at line 473 of file Language.php.
References $code, $IP, $wgExtraLanguageNames, and getCodeFromFileName().
Referenced by languages::__construct(), ApiQuerySiteinfo::appendInterwikiMap(), ApiQuerySiteinfo::appendLanguages(), SpecialAllmessages::buildForm(), MessageCache::clear(), RebuildLocalisationCache::execute(), MessageCache::figureMessage(), getLanguageName(), Xml::languageSelector(), Preferences::profilePreferences(), MessageCache::replace(), and wfGetLangObj().
static Language::getLocalisationCache | ( | ) | [static] |
Get the LocalisationCache instance.
Definition at line 195 of file Language.php.
References $wgLocalisationCacheConf.
Referenced by __construct(), MessageCache::addMessage(), MessageCache::addMessages(), MessageCache::addMessagesByLang(), AllmessagesTablePager::getAllMessages(), getFallbackFor(), getMessageFor(), getMessagesFor(), and ParserTest::setupDatabase().
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.
$text | String |
Definition at line 334 of file Language.php.
References getNamespaceIds(), and lc().
Language::getMagic | ( | $ | mw | ) |
Definition at line 1950 of file Language.php.
References $magicWords, getCode(), getMagicWords(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
Language::getMagicWords | ( | ) |
Language::getMathNames | ( | ) |
Definition at line 427 of file Language.php.
Language::getMessage | ( | $ | key | ) |
static Language::getMessageFor | ( | $ | key, | |
$ | code | |||
) | [static] |
Get a message for a given language.
Definition at line 2541 of file Language.php.
References $code, and getLocalisationCache().
Referenced by MessageCache::get().
Language::getMessageFromDB | ( | $ | msg | ) |
Get a message from the MediaWiki namespace.
$msg | String: message name |
Definition at line 499 of file Language.php.
References $msg, and wfMsgExt().
Referenced by formatSize(), getHebrewCalendarMonthName(), getHebrewCalendarMonthNameGen(), getHijriCalendarMonthName(), getIranianCalendarMonthName(), getMonthAbbreviation(), getMonthName(), getMonthNameGen(), getUserToggle(), getVariantname(), getWeekdayAbbreviation(), getWeekdayName(), listToText(), and translateBlockExpiry().
static Language::getMessagesFileName | ( | $ | code | ) | [static] |
Definition at line 2508 of file Language.php.
References $code, $IP, and getFileName().
Referenced by Digit2Html::execute(), LocalisationCache::initLanguage(), languages::loadFile(), LocalisationCache::recache(), and MessageWriter::writeMessagesToFile().
static Language::getMessagesFor | ( | $ | code | ) | [static] |
Get all messages for a given language WARNING: this may take a long time.
Definition at line 2534 of file Language.php.
References $code, and getLocalisationCache().
Referenced by DumpMessages::execute(), AllTrans::execute(), and ApiQueryAllmessages::execute().
Language::getMonthAbbreviation | ( | $ | key | ) |
Definition at line 519 of file Language.php.
References getMessageFromDB().
Referenced by sprintfDate().
Language::getMonthName | ( | $ | key | ) |
Definition at line 511 of file Language.php.
References getMessageFromDB().
Referenced by LanguageWa::date(), and sprintfDate().
Language::getMonthNameGen | ( | $ | key | ) |
Definition at line 515 of file Language.php.
References getMessageFromDB().
Referenced by sprintfDate().
Language::getNamespaceAliases | ( | ) |
Definition at line 340 of file Language.php.
References $name, and fixVariableInNamespace().
Referenced by getNamespaceIds().
Language::getNamespaceIds | ( | ) |
Definition at line 359 of file Language.php.
References $name, $wgNamespaceAliases, getNamespaceAliases(), getNamespaces(), and lc().
Referenced by getLocalNsIndex(), and getNsIndex().
Language::getNamespaces | ( | ) |
Definition at line 258 of file Language.php.
References $wgExtraNamespaces, $wgMetaNamespace, $wgMetaNamespaceTalk, and fixVariableInNamespace().
Referenced by getFormattedNamespaces(), getNamespaceIds(), and getNsText().
Language::getNsIndex | ( | $ | text | ) |
Get a namespace key by value, case insensitive.
Canonical namespace names override custom ones defined for the current language.
$text | String |
Definition at line 390 of file Language.php.
References MWNamespace::getCanonicalIndex(), getNamespaceIds(), and lc().
Language::getNsText | ( | $ | index | ) |
Get a namespace value by key $mw_ns = $wgContLang->getNsText( NS_MEDIAWIKI ); echo $mw_ns; // prints 'MediaWiki'
.
$index | Int: the array key of the namespace to return |
Definition at line 309 of file Language.php.
References getNamespaces().
Referenced by getFormattedNsText(), and specialPage().
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.
Definition at line 2432 of file Language.php.
Language::getPreferredVariant | ( | $ | fromUser = true , |
|
$ | fromHeader = false | |||
) |
Definition at line 2385 of file Language.php.
Referenced by LanguageKk::convertGrammar(), LanguageKk::isRTL(), LanguageKk::lcfirst(), and LanguageKk::ucfirst().
Language::getQuickbarSettings | ( | ) |
Language::getSpecialPageAliases | ( | ) |
Get special page names, as an associative array case folded alias => real name.
Definition at line 2001 of file Language.php.
References getCode(), and wfRunHooks().
Referenced by specialPage().
Language::getUserToggle | ( | $ | tog | ) |
Language::getVariantname | ( | $ | code | ) |
short names for language variants used for language conversion links.
$code | String |
Definition at line 405 of file Language.php.
References getMessageFromDB().
Language::getVariants | ( | ) |
get the list of variants supported by this langauge see sample implementation in LanguageZh.php
Definition at line 2380 of file Language.php.
Referenced by hasVariants().
Language::getWeekdayAbbreviation | ( | $ | key | ) |
Definition at line 527 of file Language.php.
References getMessageFromDB().
Referenced by sprintfDate().
Language::getWeekdayName | ( | $ | key | ) |
Definition at line 523 of file Language.php.
References getMessageFromDB().
Referenced by sprintfDate().
Language::hasVariants | ( | ) |
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.
Reimplemented in LanguageYue, and LanguageZh_hans.
Definition at line 1703 of file Language.php.
static Language::hebrewNumeral | ( | $ | num | ) | [static] |
Hebrew Gematria number formatting up to 9999.
Definition at line 1306 of file Language.php.
Referenced by sprintfDate().
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.
Definition at line 1184 of file Language.php.
Referenced by tsToHebrew().
Language::iconv | ( | $ | in, | |
$ | out, | |||
$ | string | |||
) |
Reimplemented in LanguageEo.
Definition at line 1487 of file Language.php.
References $in, $out, wfRestoreWarnings(), and wfSuppressWarnings().
Referenced by checkTitleEncoding(), recodeForEdit(), and recodeInput().
Language::initContLang | ( | ) |
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 228 of file Language.php.
Language::initEncoding | ( | ) |
static Language::insertSpace | ( | $ | string, | |
$ | pattern | |||
) | [static, protected] |
Definition at line 1739 of file Language.php.
Referenced by LanguageZh_hans::wordSegmentation(), LanguageYue::wordSegmentation(), and LanguageJa::wordSegmentation().
Language::isMultibyte | ( | $ | str | ) |
Language::isRTL | ( | ) |
For right-to-left language support.
Reimplemented in LanguageKk.
Definition at line 1878 of file Language.php.
Referenced by alignEnd(), alignStart(), getArrow(), getDir(), and getDirMark().
static Language::isValidCode | ( | $ | code | ) | [static] |
Returns true if a language code string is of a valid form, whether or not it exists.
Definition at line 188 of file Language.php.
References $code.
Referenced by StubUserLang::_newObject(), getFileName(), and newFromCode().
Language::lc | ( | $ | str, | |
$ | first = false | |||
) |
Definition at line 1581 of file Language.php.
References $wikiLowerChars, getCaseMaps(), and isMultibyte().
Referenced by getLocalNsIndex(), getNamespaceIds(), getNsIndex(), lcfirst(), ucwordbreaks(), and ucwords().
Language::lcCallback | ( | $ | matches | ) |
Language::lcfirst | ( | $ | str | ) |
Reimplemented in LanguageKaa, and LanguageKk.
Definition at line 1567 of file Language.php.
References lc().
Language::linkPrefixExtension | ( | ) |
To allow "foo[[bar]]" to extend the link over the whole word "foobar".
Definition at line 1941 of file Language.php.
Language::linkTrail | ( | ) |
A regular expression to match legal word-trailing characters which should be merged onto a link of the form [[foo]]bar.
Definition at line 2454 of file Language.php.
Language::listToText | ( | $ | 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".
$l | Array |
Definition at line 2102 of file Language.php.
References $i, $s, and getMessageFromDB().
Language::markNoConversion | ( | $ | text, | |
$ | noParse = false | |||
) |
Enclose a string with the "no conversion" tag.
This is used by various functions in the Parser
$text | String: text to be tagged for no conversion | |
$noParse |
Definition at line 2444 of file Language.php.
static Language::newFromCode | ( | $ | code | ) | [static, protected] |
Create a language object for a given language code.
Definition at line 144 of file Language.php.
References $code, $fallback, $IP, getFallbackFor(), isValidCode(), and ucfirst().
Referenced by factory().
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.
Reimplemented in LanguageAr, and LanguageMl.
Definition at line 1850 of file Language.php.
References $s, and UtfNormal::cleanUp().
Language::normalizeForSearch | ( | $ | string | ) |
Some languages have special punctuation need to be normalized.
Make such changes here.
$string | String |
Reimplemented in LanguageJa, LanguageYue, and LanguageZh_hans.
Definition at line 1725 of file Language.php.
Language::parseFormattedNumber | ( | $ | number | ) |
Definition at line 2064 of file Language.php.
References $s, digitTransformTable(), and separatorTransformTable().
Language::pipeList | ( | $ | list | ) |
Same as commaList, but separate it with the pipe instead.
$list | array of strings to put in a pipe list |
Definition at line 2151 of file Language.php.
References wfMsgExt().
Language::preConvertPlural | ( | $ | forms, | |
$ | count | |||
) | [protected] |
Checks that convertPlural was given an array and pads it to requested amound of forms by copying the last one.
$count | Integer: How many forms should there be at least | |
$forms | Array of forms given to convertPlural |
Definition at line 2279 of file Language.php.
Referenced by convertPlural(), LanguageWa::convertPlural(), LanguageUk::convertPlural(), LanguageTl::convertPlural(), LanguageTi::convertPlural(), LanguageSr_el::convertPlural(), LanguageSr_ec::convertPlural(), LanguageSr::convertPlural(), LanguageSma::convertPlural(), LanguageSl::convertPlural(), LanguageSk::convertPlural(), LanguageSh::convertPlural(), LanguageSe::convertPlural(), LanguageRu::convertPlural(), LanguageRo::convertPlural(), LanguagePt_br::convertPlural(), LanguagePl::convertPlural(), LanguageNso::convertPlural(), LanguageMt::convertPlural(), LanguageMo::convertPlural(), LanguageMk::convertPlural(), LanguageMg::convertPlural(), LanguageLv::convertPlural(), LanguageLt::convertPlural(), LanguageLn::convertPlural(), LanguageKsh::convertPlural(), LanguageHy::convertPlural(), LanguageHsb::convertPlural(), LanguageHr::convertPlural(), LanguageHi::convertPlural(), LanguageHe::convertPlural(), LanguageGv::convertPlural(), LanguageGd::convertPlural(), LanguageGa::convertPlural(), LanguageFr::convertPlural(), LanguageDsb::convertPlural(), LanguageCy::convertPlural(), LanguageCu::convertPlural(), LanguageCs::convertPlural(), LanguageBs::convertPlural(), LanguageBh::convertPlural(), LanguageBe_tarask::convertPlural(), LanguageBe::convertPlural(), LanguageBat_smg::convertPlural(), LanguageAr::convertPlural(), LanguageAm::convertPlural(), and gender().
Language::recodeForEdit | ( | $ | s | ) |
Language::recodeInput | ( | $ | s | ) |
Language::replaceGrammarInNamespace | ( | $ | m | ) |
static Language::romanNumeral | ( | $ | num | ) | [static] |
Roman number formatting up to 3000.
Definition at line 1280 of file Language.php.
Referenced by sprintfDate().
Language::segmentForDiff | ( | $ | text | ) |
languages like Chinese need to be segmented in order for the diff to be of any use
$text | String |
Reimplemented in LanguageGan, and LanguageZh.
Definition at line 2319 of file Language.php.
Language::semicolonList | ( | $ | list | ) |
Take a list of strings and build a locale-friendly semicolon-separated list, using the local semicolon-separator message.
$list | array of strings to put in a semicolon list |
Definition at line 2140 of file Language.php.
References wfMsgExt().
Language::separatorTransformTable | ( | ) |
Definition at line 2089 of file Language.php.
Referenced by formatNum(), and parseFormattedNumber().
Language::setCode | ( | $ | code | ) |
Language::specialPage | ( | $ | name | ) |
Definition at line 409 of file Language.php.
References $name, getNsText(), and getSpecialPageAliases().
Language::sprintfDate | ( | $ | format, | |
$ | ts | |||
) |
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 dDjlNwzWFmMntLoYyaAgGhHiscrU. See the PHP manual for definitions. "o" format character is supported since PHP 5.1.0, previous versions return literal o. 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 (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.
$format | String | |
$ts | String: 14-character timestamp YYYYMMDDHHMMSS 01234567890123 |
handling of "o" format character for Iranian, Hebrew, Hijri & Thai?
Definition at line 675 of file Language.php.
References $code, $s, date(), formatNum(), getHebrewCalendarMonthName(), getHebrewCalendarMonthNameGen(), getHijriCalendarMonthName(), getIranianCalendarMonthName(), getMonthAbbreviation(), getMonthName(), getMonthNameGen(), getWeekdayAbbreviation(), getWeekdayName(), hebrewNumeral(), romanNumeral(), tsToHebrew(), tsToHijri(), tsToIranian(), tsToYear(), and wfTimestamp().
Referenced by date(), time(), and timeanddate().
Language::time | ( | $ | ts, | |
$ | adj = false , |
|||
$ | format = true , |
|||
$ | timecorrection = false | |||
) |
$ts | Mixed: the time format which needs to be turned into a date('YmdHis') format with wfTimestamp(TS_MW,$ts) | |
$adj | Bool: whether to adjust the time output according to the user configured offset ($timecorrection) | |
$format | Mixed: true to use user's date format preference | |
$timecorrection | String: the time offset as returned by validateTimeZone() in Special:Preferences |
Definition at line 1451 of file Language.php.
References dateFormat(), getDateFormatString(), sprintfDate(), and userAdjust().
Referenced by LanguageWa::timeanddate().
Language::timeanddate | ( | $ | ts, | |
$ | adj = false , |
|||
$ | format = true , |
|||
$ | timecorrection = false | |||
) |
$ts | Mixed: the time format which needs to be turned into a date('YmdHis') format with wfTimestamp(TS_MW,$ts) | |
$adj | Bool: whether to adjust the time output according to the user configured offset ($timecorrection) | |
$format | Mixed: what format to return, if it's false output the default one (default true) | |
$timecorrection | String: the time offset as returned by validateTimeZone() in Special:Preferences |
Reimplemented in LanguageWa.
Definition at line 1470 of file Language.php.
References dateFormat(), getDateFormatString(), sprintfDate(), userAdjust(), and wfTimestamp().
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.
Definition at line 1862 of file Language.php.
References wfGetPrecompiledData().
Referenced by LanguageMl::normalize(), and LanguageAr::normalize().
Language::translateBlockExpiry | ( | $ | str | ) |
For translaing of expiry times.
$str | String: the validated block time in English |
Definition at line 2292 of file Language.php.
References getMessageFromDB().
Language::truncate | ( | $ | string, | |
$ | length, | |||
$ | ellipsis = '...' | |||
) |
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
$string | String to truncate | |
$length | Int: maximum length (excluding ellipses) | |
$ellipsis | String to append to the truncated text |
Definition at line 2172 of file Language.php.
References wfMsgExt().
static Language::tsToHebrew | ( | $ | ts | ) | [static, private] |
Converting Gregorian dates to Hebrew dates.
Based on a JavaScript code by Abu Mami and Yisrael Hersch (abu-mami@kaluach.net, 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.
Definition at line 1047 of file Language.php.
References $i, and hebrewYearStart().
Referenced by sprintfDate().
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
&file=article&sid=8234&mode=thread&order=0&thold=0
Definition at line 1001 of file Language.php.
Referenced by sprintfDate().
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
Definition at line 947 of file Language.php.
References $i.
Referenced by sprintfDate().
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
$ts | String: 14-character timestamp, calender name |
Definition at line 1221 of file Language.php.
Referenced by sprintfDate().
Language::uc | ( | $ | str, | |
$ | first = false | |||
) |
Definition at line 1541 of file Language.php.
References $wikiUpperChars, getCaseMaps(), isMultibyte(), and ucfirst().
Referenced by caseFold(), and ucfirst().
Language::ucCallback | ( | $ | matches | ) |
Language::ucfirst | ( | $ | str | ) |
Reimplemented in LanguageAz, LanguageKaa, LanguageKk, and LanguageTr.
Definition at line 1529 of file Language.php.
References uc().
Referenced by getFileName(), newFromCode(), LanguageConverter::parseCachedTable(), uc(), and ucwordbreaksCallbackAscii().
Language::ucwordbreaks | ( | $ | str | ) |
Language::ucwordbreaksCallbackAscii | ( | $ | matches | ) |
Language::ucwordbreaksCallbackMB | ( | $ | matches | ) |
Definition at line 1506 of file Language.php.
Language::ucwords | ( | $ | str | ) |
Language::ucwordsCallbackMB | ( | $ | matches | ) |
Definition at line 1520 of file Language.php.
Language::ucwordsCallbackWiki | ( | $ | matches | ) |
Language::unsegmentForDiff | ( | $ | text | ) |
and unsegment to show the result
$text | String |
Reimplemented in LanguageGan, and LanguageZh.
Definition at line 2329 of file Language.php.
Language::userAdjust | ( | $ | ts, | |
$ | tz = false | |||
) |
Used by date() and time() to adjust the time output.
$ts | Int the time in date('YmdHis') format | |
$tz | Mixed: adjust the time by this amount (default false, mean we get user timecorrection setting) |
Definition at line 555 of file Language.php.
References $t, $wgLocalTZoffset, $wgUser, date(), wfRestoreWarnings(), and wfSuppressWarnings().
Referenced by date(), LanguageWa::date(), time(), timeanddate(), and LanguageWa::timeanddate().
Language::wordSegmentation | ( | $ | string | ) |
Some languages such as Chinese require word segmentation, Specify such segmentation when overridden in derived class.
$string | String |
Reimplemented in LanguageJa, LanguageYue, and LanguageZh_hans.
Definition at line 1714 of file Language.php.
Language::$dataCache [static] |
Definition at line 70 of file Language.php.
Language::$dateFormatStrings = array() |
Definition at line 62 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 937 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 938 of file Language.php.
Language::$mCode |
Definition at line 58 of file Language.php.
Language::$mConverter |
Definition at line 58 of file Language.php.
Language::$mExtendedSpecialPageAliases |
Definition at line 63 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 112 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 104 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 120 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 97 of file Language.php.
Language::$mLangObjCache = array() [static] |
Definition at line 71 of file Language.php.
Language::$mLoaded = false |
Definition at line 58 of file Language.php.
Language::$mMagicExtensions = array() |
Definition at line 59 of file Language.php.
Language::$mMagicHookDone = false |
Definition at line 59 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 92 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 87 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 82 of file Language.php.
Language::$mNamespaceIds |
Definition at line 61 of file Language.php.
Language::$mVariants |
Definition at line 58 of file Language.php.
Language::$mWeekdayAbbrevMsgs [static] |
Initial value:
array( 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat' )
Definition at line 78 of file Language.php.
Language::$mWeekdayMsgs [static] |
Initial value:
array( 'sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday' )
Definition at line 73 of file Language.php.
Language::$namespaceAliases |
Definition at line 61 of file Language.php.
Language::$namespaceNames |
Definition at line 61 of file Language.php.
Language::$transformData = array() |