MediaWiki REL1_39
MediaWiki\Languages\LanguageConverterFactory Class Reference

An interface for creating language converters. More...

Public Member Functions

 __construct (ObjectFactory $objectFactory, $usePigLatinVariant, $isConversionDisabled, $isTitleConversionDisabled, callable $defaultLanguage)
 
 getLanguageConverter ( $language=null)
 Provide a LanguageConverter for given language.
 
 isConversionDisabled ()
 Whether to disable language variant conversion.
 
 isLinkConversionDisabled ()
 Whether to disable language variant conversion for links.
 
 isTitleConversionDisabled ()
 Whether to disable language variant conversion for titles.
 

Detailed Description

An interface for creating language converters.

Since
1.35

Definition at line 48 of file LanguageConverterFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Languages\LanguageConverterFactory::__construct ( ObjectFactory  $objectFactory,
  $usePigLatinVariant,
  $isConversionDisabled,
  $isTitleConversionDisabled,
callable  $defaultLanguage 
)
Parameters
ObjectFactory$objectFactory
bool$usePigLatinVariantshould pig variant of English be used
bool$isConversionDisabledWhether to disable language variant conversion
bool$isTitleConversionDisabledWhether to disable language variant conversion for links
callable$defaultLanguagecallback of () : Language, should return default language. Used in getLanguageConverter when $language is null.
Access: internal
Should be called from MediaWikiServices only.

Definition at line 132 of file LanguageConverterFactory.php.

References MediaWiki\Languages\LanguageConverterFactory\isConversionDisabled(), and MediaWiki\Languages\LanguageConverterFactory\isTitleConversionDisabled().

Member Function Documentation

◆ getLanguageConverter()

◆ isConversionDisabled()

MediaWiki\Languages\LanguageConverterFactory::isConversionDisabled ( )

Whether to disable language variant conversion.

Returns
bool

Definition at line 190 of file LanguageConverterFactory.php.

Referenced by MediaWiki\Languages\LanguageConverterFactory\__construct(), and Parser\__construct().

◆ isLinkConversionDisabled()

MediaWiki\Languages\LanguageConverterFactory::isLinkConversionDisabled ( )

Whether to disable language variant conversion for links.

Returns
bool

Definition at line 207 of file LanguageConverterFactory.php.

◆ isTitleConversionDisabled()

MediaWiki\Languages\LanguageConverterFactory::isTitleConversionDisabled ( )

Whether to disable language variant conversion for titles.

Returns
bool
Deprecated:
since 1.36 Should use ::isLinkConversionDisabled() instead

Definition at line 199 of file LanguageConverterFactory.php.

Referenced by MediaWiki\Languages\LanguageConverterFactory\__construct().


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