PHP Class Airship\Engine\Translation

Registry Singleton for keeping track of application state
Show file Open project: paragonie/airship

Public Methods

Method Description
format ( string $text, $params ) : string Translate a string with gettext(), then format the output
literal ( string $message, string $domain = 'default' ) : string Literal translation (provided by gettext())
lookup ( string $key, string $lang = 'en-us', $params ) : string Lookup a string from a language file

Method Details

format() public method

Translate a string with gettext(), then format the output
public format ( string $text, $params ) : string
$text string
$params
return string

literal() public method

Literal translation (provided by gettext())
public literal ( string $message, string $domain = 'default' ) : string
$message string
$domain string
return string

lookup() public method

Lookup a string from a language file
public lookup ( string $key, string $lang = 'en-us', $params ) : string
$key string
$lang string
$params
return string