WikiLambda
MediaWiki WikiLambda extension
|
Builder of a string for a certain language. More...
Public Member Functions | |
__construct (Language $lang, ZMultiLingualString $provider) | |
fallbackWithEnglish () | |
If the string for the language passed to the constructor is not available, fallback to Engligh. | |
placeholderWith (string $placeholderText) | |
If we cannot find any string, return the passed placeholder. | |
placeholderNoFallback () | |
If we cannot find any string, return the default placeholder. | |
placeholderForTitle () | |
If we cannot find any string, return the placeholder for a title. | |
getLanguageProvided () | |
getStringAndLanguageCode () | |
Return the string and the language code. | |
getString () | |
Return the string. | |
Builder of a string for a certain language.
Don't instantiate it directly, rather call MediaWiki\Extension\WikiLambda\ZObjects\ZMultilingualString->buildStringForLanguage( $lang )
MediaWiki\Extension\WikiLambda\ZObjects\StringForLanguageBuilder::__construct | ( | Language | $lang, |
ZMultiLingualString | $provider ) |
Language | $lang | The language with build the string for |
ZMultilingualString | $provider | Object that provides the localized strings. |
MediaWiki\Extension\WikiLambda\ZObjects\StringForLanguageBuilder::fallbackWithEnglish | ( | ) |
If the string for the language passed to the constructor is not available, fallback to Engligh.
MediaWiki\Extension\WikiLambda\ZObjects\StringForLanguageBuilder::getLanguageProvided | ( | ) |
MediaWiki\Extension\WikiLambda\ZObjects\StringForLanguageBuilder::getString | ( | ) |
Return the string.
MediaWiki\Extension\WikiLambda\ZObjects\StringForLanguageBuilder::getStringAndLanguageCode | ( | ) |
Return the string and the language code.
MediaWiki\Extension\WikiLambda\ZObjects\StringForLanguageBuilder::placeholderForTitle | ( | ) |
If we cannot find any string, return the placeholder for a title.
MediaWiki\Extension\WikiLambda\ZObjects\StringForLanguageBuilder::placeholderNoFallback | ( | ) |
If we cannot find any string, return the default placeholder.
MediaWiki\Extension\WikiLambda\ZObjects\StringForLanguageBuilder::placeholderWith | ( | string | $placeholderText | ) |
If we cannot find any string, return the passed placeholder.
string | $placeholderText | Key of the placeholder |