PHP Trait omgdef\multilingual\MultilingualTrait

Modify ActiveRecord query for multilingual support
显示文件 Open project: omgdef/yii2-multilingual-behavior

Public Properties

Property Type Description
$languageField the name of the lang field of the translation table. Default to 'language'.

Public Methods

Method Description
localized ( string $language = null, boolean $abridge = true ) Scope for querying by languages
multilingual ( ) Scope for querying by all languages

Method Details

localized() public method

Scope for querying by languages
public localized ( string $language = null, boolean $abridge = true )
$language string
$abridge boolean

multilingual() public method

Scope for querying by all languages
public multilingual ( )

Property Details

$languageField public_oe property

the name of the lang field of the translation table. Default to 'language'.
public $languageField