Class MultiLanguageDataProvider.

Implementation of a multi language Contao database data provider. The default language will be initialized to "en".

 Methods

Constructor - initializes the object with English as working language.

__construct() 

Get the current working language.

getCurrentLanguage() : string

Returns

stringShort tag for the current working language like de or fr etc.

Get the fallback language of a certain record.

getFallbackLanguage(mixed $mixID) : \ContaoCommunityAlliance\DcGeneral\Data\LanguageInformationInterface

Parameters

$mixID

mixed

The ID of the record to retrieve.

Returns

Get all available languages of a certain record.

getLanguages(mixed $mixID) : \ContaoCommunityAlliance\DcGeneral\Data\LanguageInformationCollectionInterface

Parameters

$mixID

mixed

The ID of the record to retrieve.

Returns

Set the current working language for the whole data provider.

setCurrentLanguage(string $strLanguage) : \ContaoCommunityAlliance\DcGeneral\Data\DataProviderInterface

Parameters

$strLanguage

string

The new language, use short tag "2 chars like de, fr etc.".

Returns

 Properties

 

Buffer to keep the current active working language.

$strCurrentLanguage : string