PHP Класс Fenos\Notifynder\Translator\TranslatorManager

The Translator is responsible to translate the text of the notifications with the custom languages that you'll define in the configuration file. Translations are cached in storage/app/notifynder in a json format. Usage: [ 'it' => [ 'name.category' => 'text to {parse value} translate' ] ]
Наследование: implements Fenos\Notifynder\Contracts\NotifynderTranslator
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$compiler Compiler

Открытые методы

Метод Описание
__construct ( Compiler $compiler, Illuminate\Contracts\Config\Repository $config )
getLanguage ( $language ) : mixed Get selected language of translations.
getTranslations ( ) : array | mixed Get translations.
translate ( $language, $nameCategory ) : mixed Translate the given category.

Защищенные методы

Метод Описание
cacheFromConfig ( ) : array Get the translations from the array of the config file and it will cache them.

Описание методов

__construct() публичный Метод

public __construct ( Compiler $compiler, Illuminate\Contracts\Config\Repository $config )
$compiler Compiler
$config Illuminate\Contracts\Config\Repository

cacheFromConfig() защищенный Метод

Get the translations from the array of the config file and it will cache them.
protected cacheFromConfig ( ) : array
Результат array

getLanguage() публичный Метод

Get selected language of translations.
public getLanguage ( $language ) : mixed
$language
Результат mixed

getTranslations() публичный Метод

Get translations.
public getTranslations ( ) : array | mixed
Результат array | mixed

translate() публичный Метод

Translate the given category.
public translate ( $language, $nameCategory ) : mixed
$language
$nameCategory
Результат mixed

Описание свойств

$compiler защищенное свойство

protected Compiler,Fenos\Notifynder\Translator $compiler
Результат Compiler