|
| __construct ($config, $context) |
|
| formatMessage ($key, $args=array()) |
| Formats a localised message with passed parameters.
|
|
| getErrorName ($int) |
| Retrieves a localised error name.
|
|
| getMessage ($key) |
| Retrieves a localised message.
|
|
| listify ($array) |
| Converts an array list into a string readable representation.
|
|
| load () |
| Loads language object with necessary info from factory cache.
|
|
|
| $_loaded = false |
| Has the language object been loaded yet? @type bool.
|
|
| $code = 'en' |
| ISO 639 language code of language.
|
|
| $error = false |
| True if no message file was found for this language, so English is being used instead.
|
|
| $errorNames = array() |
| Array of localizable error codes.
|
|
| $fallback = false |
| Fallback language code.
|
|
| $messages = array() |
| Array of localizable messages.
|
|
◆ __construct()
HTMLPurifier_Language::__construct |
( |
| $config, |
|
|
| $context ) |
◆ formatMessage()
HTMLPurifier_Language::formatMessage |
( |
| $key, |
|
|
| $args = array() ) |
Formats a localised message with passed parameters.
- Parameters
-
string | $key | string identifier of message |
array | $args | Parameters to substitute in |
- Return values
-
- Todo
- Implement conditionals? Right now, some messages make reference to line numbers, but those aren't always available
◆ getErrorName()
HTMLPurifier_Language::getErrorName |
( |
| $int | ) |
|
Retrieves a localised error name.
- Parameters
-
int | $int | error number, corresponding to PHP's error reporting |
- Return values
-
◆ getMessage()
HTMLPurifier_Language::getMessage |
( |
| $key | ) |
|
Retrieves a localised message.
- Parameters
-
string | $key | string identifier of message |
- Return values
-
◆ listify()
HTMLPurifier_Language::listify |
( |
| $array | ) |
|
Converts an array list into a string readable representation.
- Parameters
-
- Return values
-
◆ load()
HTMLPurifier_Language::load |
( |
| ) |
|
Loads language object with necessary info from factory cache.
- Note
- This is a lazy loader
◆ $_loaded
HTMLPurifier_Language::$_loaded = false |
Has the language object been loaded yet? @type bool.
- Todo
- Make it private, fix usage in HTMLPurifier_LanguageTest
◆ $code
HTMLPurifier_Language::$code = 'en' |
ISO 639 language code of language.
Prefers shortest possible version. @type string
◆ $error
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. @type bool
◆ $errorNames
HTMLPurifier_Language::$errorNames = array() |
Array of localizable error codes.
@type array
◆ $fallback
HTMLPurifier_Language::$fallback = false |
Fallback language code.
@type bool|string
◆ $messages
HTMLPurifier_Language::$messages = array() |
Array of localizable messages.
@type array
The documentation for this class was generated from the following file:
- lib/htmlpurifier/HTMLPurifier/Language.php