Semantic MediaWiki and related extensions
|
It provides "local" language functions independent of MediaWiki that are required by Semantic MediaWiki and its registration system.
The location of the content files is determined by the $smwgExtraneousLanguageFileDir
setting.
fallback_language
defines a fallback language tagdatatype
labels
datatype labelsaliases
datatype aliasesproperty
labels
predefined property labelsaliases
predefined property aliasesnamespace
labels
namespace namesaliases
namespace aliasesdate
format
to define a rule set of how to resolve preferred date formats for dates with 1, 2, and 3 components. It is defined as an array where the constants define the order of the interpretation.SMW_MDY
Month-Day-YearSMW_DMY
Day-Month-YearSMW_YMD
Year-Month-DaySMW_YDM
Year-Day-MonthSMW_MY
Month-YearSMW_YM
Year-MonthSMW_Y
YearSMW_YEAR
an entered digit can be a yearSMW_DAY
an entered digit can be a daySMW_MONTH
an entered digit can be a monthSMW_DAY_MONTH_YEAR
an entered digit can be a day, month or yearSMW_DAY_YEAR
an entered digit can be either a day or a yearprecision
used to define the rules of formatting for a specific precision:SMW_PREC_Y
YearSMW_PREC_YMD
Year, Month, and DaySMW_PREC_YMDT
Year, Month, Day, and TimeSMW_PREC_YMDTZ
Year, Month, Day, Time and Timezonemonths
twelve strings naming the months and short strings briefly naming the monthdays
follows ISO-8601 numeric representation, starting with Monday together with the corresponding short name@...
fields leading with @
are identified as comment fields{ "fallback_language": false, "datatype": { "labels":{ "_wpg": "Page" }, "aliases":{ "Page": "_wpg" } }, "property": { "labels":{ "_TYPE": "Has type" }, "aliases": { "Has type": "_TYPE" } }, "namespaces": { "labels":{ "SMW_NS_PROPERTY": "Property" }, "aliases": { "Property": "SMW_NS_PROPERTY" } }, "date":{ "precision": { "SMW_PREC_YMDTZ": "H:i:s T, j F Y" }, "format": [ [ "SMW_Y" ] ], "months": [ [ "January", "Jan" ] ] "days":[ [ "Monday", "Mon" ] ] } }
SMW
├─ LocalLanguage # interface to the language functions
├─ JsonContentsFileReader # access the contents of a JSON
file
└─ FallbackFinder # resolving a fallback language