XOOPS 2.5.6
Final
|
Public Member Functions | |
__construct ($config, $context) | |
formatMessage ($key, $args=array()) | |
getErrorName ($int) | |
getMessage ($key) | |
listify ($array) | |
load () | |
Public Attributes | |
$_loaded = false | |
$code = 'en' | |
$context | |
$error = false | |
$errorNames = array() | |
$fallback = false | |
$messages = array() | |
Protected Attributes | |
$config | |
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 | |||
) |
Definition at line 48 of file Language.php.
HTMLPurifier_Language::formatMessage | ( | $key, | |
$args = array() |
|||
) |
Formats a localised message with passed parameters
$key | string identifier of message |
$args | Parameters to substitute in |
Definition at line 117 of file Language.php.
References $i, listify(), and load().
HTMLPurifier_Language::getErrorName | ( | $int | ) |
Retrieves a localised error name.
$int | integer error number, corresponding to PHP's error reporting |
Definition at line 84 of file Language.php.
References load().
HTMLPurifier_Language::getMessage | ( | $key | ) |
Retrieves a localised message.
$key | string identifier of message |
Definition at line 72 of file Language.php.
References load().
Referenced by listify().
HTMLPurifier_Language::listify | ( | $array | ) |
Converts an array list into a string readable representation
Definition at line 93 of file Language.php.
References $i, $ret, and getMessage().
Referenced by formatMessage().
HTMLPurifier_Language::load | ( | ) |
Loads language object with necessary info from factory cache
Definition at line 57 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?
Definition at line 41 of file Language.php.
HTMLPurifier_Language::$code = 'en' |
ISO 639 language code of language. Prefers shortest possible version
Definition at line 13 of file Language.php.
Referenced by load().
|
protected |
Instances of HTMLPurifier_Config and HTMLPurifier_Context
Definition at line 46 of file Language.php.
Referenced by __construct().
HTMLPurifier_Language::$context |
Definition at line 46 of file Language.php.
Referenced by __construct().
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.
Definition at line 35 of file Language.php.
HTMLPurifier_Language::$errorNames = array() |
Array of localizable error codes
Definition at line 28 of file Language.php.
HTMLPurifier_Language::$fallback = false |
Fallback language code
Definition at line 18 of file Language.php.
HTMLPurifier_Language::$messages = array() |
Array of localizable messages
Definition at line 23 of file Language.php.