|
Moodle
2.2.1
http://www.collinsharper.com
|

Public Member Functions | |
| __construct ($config, $context) | |
| load () | |
| getMessage ($key) | |
| getErrorName ($int) | |
| listify ($array) | |
| formatMessage ($key, $args=array()) | |
Data Fields | |
| $code = 'en' | |
| $fallback = false | |
| $messages = array() | |
| $errorNames = array() | |
| $error = false | |
| $_loaded = false | |
| $context | |
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.
| __construct | ( | $ | config, |
| $ | context | ||
| ) |
Definition at line 48 of file Language.php.
| 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.

| 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.

| getMessage | ( | $ | key | ) |
Retrieves a localised message.
| $key | string identifier of message |
Definition at line 72 of file Language.php.


| listify | ( | $ | array | ) |
Converts an array list into a string readable representation
Definition at line 93 of file Language.php.


| load | ( | ) |
Loads language object with necessary info from factory cache
Definition at line 57 of file Language.php.

| $_loaded = false |
Has the language object been loaded yet?
Definition at line 41 of file Language.php.
| $code = 'en' |
ISO 639 language code of language. Prefers shortest possible version
Definition at line 13 of file Language.php.
$config [protected] |
Instances of HTMLPurifier_Config and HTMLPurifier_Context
Definition at line 46 of file Language.php.
Definition at line 46 of file Language.php.
| $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.
| $errorNames = array() |
Array of localizable error codes
Definition at line 28 of file Language.php.
| $fallback = false |
Fallback language code
Definition at line 18 of file Language.php.
| $messages = array() |
Array of localizable messages
Definition at line 23 of file Language.php.