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


Public Member Functions | |
| __construct ($otherroot, $localroot, $cacheroot, $usediskcache, $translist, $menucache) | |
| get_language_dependencies ($lang) | |
| load_component_strings ($component, $lang, $disablecache=false, $disablelocal=false) | |
| string_exists ($identifier, $component) | |
| get_string ($identifier, $component= '', $a=NULL, $lang=NULL) | |
| get_performance_summary () | |
| get_list_of_countries ($returnall=false, $lang=NULL) | |
| get_list_of_languages ($lang=NULL, $standard= 'iso6391') | |
| translation_exists ($lang, $includeall=true) | |
| get_list_of_translations ($returnall=false) | |
| get_list_of_currencies ($lang=NULL) | |
| reset_caches () | |
Protected Attributes | |
| $otherroot | |
| $localroot | |
| $cacheroot | |
| $cache = array() | |
| $countgetstring = 0 | |
| $countmemcache = 0 | |
| $countdiskcache = 0 | |
| $usediskcache | |
| $translist | |
| $menucache | |
Definition at line 6074 of file moodlelib.php.
| __construct | ( | $ | otherroot, |
| $ | localroot, | ||
| $ | cacheroot, | ||
| $ | usediskcache, | ||
| $ | translist, | ||
| $ | menucache | ||
| ) |
Create new instance of string manager
| string | $otherroot | location of downlaoded lang packs - usually $CFG->dataroot/lang |
| string | $localroot | usually the same as $otherroot |
| string | $cacheroot | usually lang dir in cache folder |
| bool | $usediskcache | use disk cache |
| array | $translist | limit list of visible translations |
| string | $menucache | the location of a file that caches the list of available translations |
Definition at line 6106 of file moodlelib.php.
| get_language_dependencies | ( | $ | lang | ) |
Returns dependencies of current language, en is not included.
| string | $lang |
Definition at line 6120 of file moodlelib.php.

| get_list_of_countries | ( | $ | returnall = false, |
| $ | lang = NULL |
||
| ) |
Returns a localised list of all country names, sorted by localised name.
| bool | $returnall | return all or just enabled |
| string | $lang | moodle translation language, NULL means use current |
Implements string_manager.
Definition at line 6407 of file moodlelib.php.

| get_list_of_currencies | ( | $ | lang = NULL | ) |
Returns localised list of currencies.
| string | $lang | moodle translation language, NULL means use current |
Implements string_manager.
Definition at line 6604 of file moodlelib.php.

| get_list_of_languages | ( | $ | lang = NULL, |
| $ | standard = 'iso6391' |
||
| ) |
Returns a localised list of languages, sorted by code keys.
| string | $lang | moodle translation language, NULL means use current |
| string | $standard | language list standard
|
Implements string_manager.
Definition at line 6439 of file moodlelib.php.

| get_list_of_translations | ( | $ | returnall = false | ) |
Returns localised list of installed translations
| bool | $returnall | return all or just enabled |
Implements string_manager.
Definition at line 6512 of file moodlelib.php.


Returns information about the string_manager performance
Definition at line 6388 of file moodlelib.php.
| get_string | ( | $ | identifier, |
| $ | component = '', |
||
| $ | a = NULL, |
||
| $ | lang = NULL |
||
| ) |
Get String returns a requested string
| string | $identifier | The identifier of the string to search for |
| string | $component | The module the string is associated with |
| string | object | array | $a | An object, string or number that can be used within translation strings |
| string | $lang | moodle translation language, NULL means use current |
Implements string_manager.
Definition at line 6290 of file moodlelib.php.

| load_component_strings | ( | $ | component, |
| $ | lang, | ||
| $ | disablecache = false, |
||
| $ | disablelocal = false |
||
| ) |
Load all strings for one component
| string | $component | The module the string is associated with |
| string | $lang | |
| bool | $disablecache | Do not use caches, force fetching the strings from sources |
| bool | $disablelocal | Do not use customized strings in xx_local language packs |
Implements string_manager.
Definition at line 6147 of file moodlelib.php.


| reset_caches | ( | ) |
Clears both in-memory and on-disk caches
Implements string_manager.
Definition at line 6618 of file moodlelib.php.

| string_exists | ( | $ | identifier, |
| $ | component | ||
| ) |
Does the string actually exist?
get_string() is throwing debug warnings, sometimes we do not want them or we want to display better explanation of the problem.
Use with care!
| string | $identifier | The identifier of the string to search for |
| string | $component | The module the string is associated with |
Implements string_manager.
Definition at line 6270 of file moodlelib.php.

| translation_exists | ( | $ | lang, |
| $ | includeall = true |
||
| ) |
Does the translation exist?
| string | $lang | moodle translation language code |
| bool | include also disabled translations? |
Implements string_manager.
Definition at line 6489 of file moodlelib.php.
$cache = array() [protected] |
Definition at line 6082 of file moodlelib.php.
$cacheroot [protected] |
Definition at line 6080 of file moodlelib.php.
$countdiskcache = 0 [protected] |
Definition at line 6088 of file moodlelib.php.
$countgetstring = 0 [protected] |
Definition at line 6084 of file moodlelib.php.
$countmemcache = 0 [protected] |
Definition at line 6086 of file moodlelib.php.
$localroot [protected] |
Definition at line 6078 of file moodlelib.php.
$menucache [protected] |
Definition at line 6094 of file moodlelib.php.
$otherroot [protected] |
Definition at line 6076 of file moodlelib.php.
$translist [protected] |
Definition at line 6092 of file moodlelib.php.
$usediskcache [protected] |
Definition at line 6090 of file moodlelib.php.