PHP Class 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' ] ]
Inheritance: implements Fenos\Notifynder\Contracts\NotifynderTranslator
Afficher le fichier Open project: fenos/notifynder Class Usage Examples

Protected Properties

Свойство Type Description
$compiler Compiler

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
cacheFromConfig ( ) : array Get the translations from the array of the config file and it will cache them.

Method Details

__construct() public méthode

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

cacheFromConfig() protected méthode

Get the translations from the array of the config file and it will cache them.
protected cacheFromConfig ( ) : array
Résultat array

getLanguage() public méthode

Get selected language of translations.
public getLanguage ( $language ) : mixed
$language
Résultat mixed

getTranslations() public méthode

Get translations.
public getTranslations ( ) : array | mixed
Résultat array | mixed

translate() public méthode

Translate the given category.
public translate ( $language, $nameCategory ) : mixed
$language
$nameCategory
Résultat mixed

Property Details

$compiler protected_oe property

protected Compiler,Fenos\Notifynder\Translator $compiler
Résultat Compiler