Maslosoft Mangan API
Trait I18NAbleTrait
I18N-able trait contains basic implementation of I18N feature. This covers
methods from InternationalInterface
.
Use this trait to provide internationalized columns for models.
Direct Known Users
Indirect Known Users
Maslosoft\Mangan\Document
,
Maslosoft\Mangan\Example\ExampleAddress
,
Maslosoft\Mangan\Example\ExampleUser
,
Maslosoft\Mangan\Model\File
,
Maslosoft\Mangan\Model\Image
,
Maslosoft\Mangan\Model\Trash
,
Maslosoft\Mangan\Model\TrashItem
See:
Maslosoft\Mangan\Interfaces\InternationalInterface
Author: Piotr Maselkowski
Located at Traits/I18NAbleTrait.php
Methods summary
public
string
|
|
public
string[]
|
|
public
mixed[]
|
#
getRawI18N( )
Get i18n values with all languages. This returns all language values of all class fields. Class field names are keys for arrays of language values, with language codes as a keys. |
public
|
|
public
|
#
setLanguages( string[] $languages, boolean $triggerEvents = true )
Set available languages. This method accepts one parameter, array contaning language codes prefably in short ISO form. |
public
|
#
setRawI18N( mixed[] $values )
Set i18n values in all languages.
This method must keep |
public
string
|
|
public
|
#
setDefaultLanguage( string $language )
Set default language used for I18N operations. This language
will be used if the |