Moodle  2.2.1
http://www.collinsharper.com
install_string_manager Class Reference
Inheritance diagram for install_string_manager:
Collaboration diagram for install_string_manager:

Public Member Functions

 __construct ()
 load_component_strings ($component, $lang, $disablecache=false, $disablelocal=false)
 string_exists ($identifier, $component)
 get_string ($identifier, $component= '', $a=NULL, $lang=NULL)
 get_list_of_countries ($returnall=false, $lang=NULL)
 get_list_of_languages ($lang=NULL, $standard= 'iso6392')
 translation_exists ($lang, $includeall=true)
 get_list_of_translations ($returnall=false)
 get_list_of_currencies ($lang=NULL)
 reset_caches ()

Protected Attributes

 $installroot

Detailed Description

Definition at line 6645 of file moodlelib.php.


Constructor & Destructor Documentation

Crate new instance of install string manager

Definition at line 6652 of file moodlelib.php.


Member Function Documentation

get_list_of_countries ( returnall = false,
lang = NULL 
)

Returns a localised list of all country names, sorted by country keys.

Parameters:
bool$returnallreturn all or just enabled
string$langmoodle translation language, NULL means use current
Returns:
array two-letter country code => translated name.

Implements string_manager.

Definition at line 6778 of file moodlelib.php.

get_list_of_currencies ( lang = NULL)

Returns localised list of currencies.

Parameters:
string$langmoodle translation language, NULL means use current
Returns:
array currency code => localised currency name

Implements string_manager.

Definition at line 6838 of file moodlelib.php.

get_list_of_languages ( lang = NULL,
standard = 'iso6392' 
)

Returns a localised list of languages, sorted by code keys.

Parameters:
string$langmoodle translation language, NULL means use current
string$standardlanguage list standard iso6392: three-letter language code (ISO 639-2/T) => translated name.
Returns:
array language code => translated name

Implements string_manager.

Definition at line 6791 of file moodlelib.php.

get_list_of_translations ( returnall = false)

Returns localised list of installed translations

Parameters:
bool$returnallreturn all or just enabled
Returns:
array moodle translation code => localised translation name

Implements string_manager.

Definition at line 6812 of file moodlelib.php.

Here is the call graph for this function:

get_string ( identifier,
component = '',
a = NULL,
lang = NULL 
)

Get String returns a requested string

Parameters:
string$identifierThe identifier of the string to search for
string$componentThe module the string is associated with
string | object | array$aAn object, string or number that can be used within translation strings
string$langmoodle translation language, NULL means use current
Returns:
string The String !

Implements string_manager.

Definition at line 6702 of file moodlelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

load_component_strings ( component,
lang,
disablecache = false,
disablelocal = false 
)

Load all strings for one component

Parameters:
string$componentThe module the string is associated with
string$lang
bool$disablecacheDo not use caches, force fetching the strings from sources
bool$disablelocalDo not use customized strings in xx_local language packs
Returns:
array of all string for given component and lang

Implements string_manager.

Definition at line 6665 of file moodlelib.php.

This implementation does not use any caches

Implements string_manager.

Definition at line 6846 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!

Parameters:
string$identifierThe identifier of the string to search for
string$componentThe module the string is associated with
Returns:
boot true if exists

Implements string_manager.

Definition at line 6682 of file moodlelib.php.

Here is the call graph for this function:

translation_exists ( lang,
includeall = true 
)

Does the translation exist?

Parameters:
string$langmoodle translation language code
boolinclude also disabled translations?
Returns:
boot true if exists

Implements string_manager.

Definition at line 6803 of file moodlelib.php.


Field Documentation

$installroot [protected]

Definition at line 6647 of file moodlelib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations