PHP Class common\Language

This is useful for when you want to use the same code in the Back- and Frontend. For instance in a trait.
Inheritance: extends Symfony\Component\Translation\IdentityTranslator
Afficher le fichier Open project: forkcms/forkcms Class Usage Examples

Méthodes publiques

Méthode Description
act ( $key ) : string Get an action.
callLanguageFunction ( $function, $parameters = [] ) : mixed
err ( $key ) : string Get an error.
get ( ) : string
lbl ( $key ) : string Get a label.
msg ( $key ) : string Get a message.
trans ( $id, array $parameters = [], $domain = null, $locale = null )

Method Details

act() public static méthode

Get an action.
public static act ( $key ) : string
$key
Résultat string

callLanguageFunction() public static méthode

public static callLanguageFunction ( $function, $parameters = [] ) : mixed
$function
$parameters
Résultat mixed

err() public static méthode

This only implements the key because the other parameters differ between the front- and backend.
public static err ( $key ) : string
$key
Résultat string

get() public static méthode

public static get ( ) : string
Résultat string

lbl() public static méthode

This only implements the key because the other parameters differ between the front- and backend.
public static lbl ( $key ) : string
$key
Résultat string

msg() public static méthode

This only implements the key because the other parameters differ between the front- and backend.
public static msg ( $key ) : string
$key
Résultat string

trans() public méthode

public trans ( $id, array $parameters = [], $domain = null, $locale = null )
$parameters array