MediaWiki master
MediaWiki\Languages\LanguageConverterFactory Class Reference

An interface for creating language converters. More...

Public Member Functions

 __construct (ServiceOptions $options, ObjectFactory $objectFactory, 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.
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 

Detailed Description

An interface for creating language converters.

Since
1.35

Definition at line 53 of file LanguageConverterFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Languages\LanguageConverterFactory::__construct ( ServiceOptions $options,
ObjectFactory $objectFactory,
callable $defaultLanguage )
Parameters
ServiceOptions$options
ObjectFactory$objectFactory
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 144 of file LanguageConverterFactory.php.

References MediaWiki\Config\ServiceOptions\assertRequiredOptions(), MediaWiki\Config\ServiceOptions\get(), and MediaWiki\MainConfigNames\UsePigLatinVariant.

Member Function Documentation

◆ getLanguageConverter()

◆ isConversionDisabled()

MediaWiki\Languages\LanguageConverterFactory::isConversionDisabled ( )

Whether to disable language variant conversion.

Returns
bool

Definition at line 203 of file LanguageConverterFactory.php.

Referenced by MediaWiki\Parser\Parser\__construct().

◆ isLinkConversionDisabled()

MediaWiki\Languages\LanguageConverterFactory::isLinkConversionDisabled ( )

Whether to disable language variant conversion for links.

Returns
bool

Definition at line 212 of file LanguageConverterFactory.php.

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\Languages\LanguageConverterFactory::CONSTRUCTOR_OPTIONS
Initial value:
= [
]
const UsePigLatinVariant
Name constant for the UsePigLatinVariant setting, for use with Config::get()
const DisableLangConversion
Name constant for the DisableLangConversion setting, for use with Config::get()
const DisableTitleConversion
Name constant for the DisableTitleConversion setting, for use with Config::get()
Access: internal
For use by ServiceWiring

Definition at line 122 of file LanguageConverterFactory.php.


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