Semantic MediaWiki and related extensions
|
Public Member Functions | |
__construct (LanguageContents $languageContents) | |
getCode () | |
fetchByLanguageCode ( $languageCode) | |
fetch ( $languageCode) | |
getNamespaces () | |
getNamespaceAliases () | |
getDatatypeLabels () | |
findDatatypeByLabel ( $label) | |
getCanonicalDatatypeLabels () | |
getDatatypeAliases () | |
getCanonicalPropertyLabels () | |
getPropertyLabels () | |
getCanonicalPropertyAliases () | |
getPropertyAliases () | |
getPropertyIdByLabel ( $label) | |
getPropertyLabelList () | |
getDateFormats () | |
getPreferredDateFormatByPrecision ( $precision=null) | |
findMonth ( $label) | |
findMonthNumberByLabel ( $label) | |
getMonthLabel ( $number) | |
getMonthLabelByNumber ( $number) | |
Static Public Member Functions | |
static | getInstance () |
static | clear () |
Protected Member Functions | |
getPropertyId ( $propertyLabel) | |
This class provides "extraneous" language functions independent from MediaWiki to handle certain language options in a way required by Semantic MediaWiki and its registration system.
GNU GPL v2+
SMW\Lang\Lang::__construct | ( | LanguageContents | $languageContents | ) |
LanguageContents | $languageContents |
|
static |
SMW\Lang\Lang::fetch | ( | $languageCode | ) |
SMW\Lang\Lang::fetchByLanguageCode | ( | $languageCode | ) |
SMW\Lang\Lang::findDatatypeByLabel | ( | $label | ) |
string | $label |
SMW\Lang\Lang::findMonth | ( | $label | ) |
SMW\Lang\Lang::findMonthNumberByLabel | ( | $label | ) |
Function looks up a month and returns the corresponding number.
string | $label |
SMW\Lang\Lang::getCanonicalDatatypeLabels | ( | ) |
SMW\Lang\Lang::getCanonicalPropertyAliases | ( | ) |
Aliases for predefined properties, if any.
SMW\Lang\Lang::getCanonicalPropertyLabels | ( | ) |
SMW\Lang\Lang::getCode | ( | ) |
SMW\Lang\Lang::getDatatypeAliases | ( | ) |
Return an array that maps aliases to internal type ids. All ids used here should also have a primary label defined in m_DatatypeLabels.
SMW\Lang\Lang::getDatatypeLabels | ( | ) |
Return all labels that are available as names for built-in datatypes. Those are the types that users can access via [[has type::...]] (more built-in types may exist for internal purposes but the user won't need to know this). The returned array is indexed by (internal) type ids.
SMW\Lang\Lang::getDateFormats | ( | ) |
Function that returns the preferred date formats
Preferred interpretations for dates with 1, 2, and 3 components. There is an array for each case, and the constants define the obvious order (e.g. SMW_YDM means "first Year, then Day, then Month). Unlisted combinations will not be accepted at all.
|
static |
SMW\Lang\Lang::getMonthLabel | ( | $number | ) |
SMW\Lang\Lang::getMonthLabelByNumber | ( | $number | ) |
Return the name of the month with the given number.
integer | $number |
SMW\Lang\Lang::getNamespaceAliases | ( | ) |
Function that returns an array of namespace aliases, if any
SMW\Lang\Lang::getNamespaces | ( | ) |
Function that returns an array of namespace identifiers.
SMW\Lang\Lang::getPreferredDateFormatByPrecision | ( | $precision = null | ) |
integer | null | $precision |
SMW\Lang\Lang::getPropertyAliases | ( | ) |
Aliases for predefined properties, if any.
|
protected |
SMW\Lang\Lang::getPropertyIdByLabel | ( | $label | ) |
Function receives property name (for example, `Modificatino date') and returns a property id (for example, `_MDAT'). Property name may be localized one. If property name is not recognized, a null value returned.
SMW\Lang\Lang::getPropertyLabelList | ( | ) |
SMW\Lang\Lang::getPropertyLabels | ( | ) |
Function that returns the labels for predefined properties.