ILIAS
Release_5_0_x_branch Revision 61816
|
Represents a language and defines localizable string formatting and other functions, as well as the localized messages for HTML Purifier. More...
Public Member Functions | |
__construct ($config, $context) | |
load () | |
Loads language object with necessary info from factory cache. | |
getMessage ($key) | |
Retrieves a localised message. | |
getErrorName ($int) | |
Retrieves a localised error name. | |
listify ($array) | |
Converts an array list into a string readable representation. | |
formatMessage ($key, $args=array()) | |
Formats a localised message with passed parameters. |
Data Fields | |
$code = 'en' | |
ISO 639 language code of language. | |
$fallback = false | |
Fallback language code. | |
$messages = array() | |
Array of localizable messages. | |
$errorNames = array() | |
Array of localizable error codes. | |
$error = false | |
True if no message file was found for this language, so English is being used instead. | |
$_loaded = false | |
Has the language object been loaded yet? bool. |
Protected Attributes | |
$config | |
HTMLPurifier_Config | |
$context | |
HTMLPurifier_Context |
Represents a language and defines localizable string formatting and other functions, as well as the localized messages for HTML Purifier.
Definition at line 7 of file Language.php.
HTMLPurifier_Language::__construct | ( | $config, | |
$context | |||
) |
HTMLPurifier_Config | $config | |
HTMLPurifier_Context | $context |
Definition at line 63 of file Language.php.
HTMLPurifier_Language::formatMessage | ( | $key, | |
$args = array() |
|||
) |
Formats a localised message with passed parameters.
string | $key | string identifier of message |
array | $args | Parameters to substitute in |
Definition at line 148 of file Language.php.
References listify(), and load().
HTMLPurifier_Language::getErrorName | ( | $int | ) |
Retrieves a localised error name.
int | $int | error number, corresponding to PHP's error reporting |
Definition at line 107 of file Language.php.
References load().
HTMLPurifier_Language::getMessage | ( | $key | ) |
Retrieves a localised message.
string | $key | string identifier of message |
Definition at line 91 of file Language.php.
References load().
Referenced by listify().
HTMLPurifier_Language::listify | ( | $array | ) |
Converts an array list into a string readable representation.
array | $array |
Definition at line 123 of file Language.php.
References $ret, and getMessage().
Referenced by formatMessage().
HTMLPurifier_Language::load | ( | ) |
Loads language object with necessary info from factory cache.
Definition at line 73 of file Language.php.
References $code, and HTMLPurifier_LanguageFactory\instance().
Referenced by formatMessage(), getErrorName(), and getMessage().
HTMLPurifier_Language::$_loaded = false |
Has the language object been loaded yet? bool.
Definition at line 47 of file Language.php.
HTMLPurifier_Language::$code = 'en' |
ISO 639 language code of language.
Prefers shortest possible version. string
Definition at line 14 of file Language.php.
Referenced by load().
|
protected |
|
protected |
HTMLPurifier_Language::$error = false |
True if no message file was found for this language, so English is being used instead.
Check this if you'd like to notify the user that they've used a non-supported language. bool
Definition at line 40 of file Language.php.
HTMLPurifier_Language::$errorNames = array() |
HTMLPurifier_Language::$fallback = false |
HTMLPurifier_Language::$messages = array() |