Moodle  2.2.1
http://www.collinsharper.com
string_manager Interface Reference
Inheritance diagram for string_manager:

Public Member Functions

 get_string ($identifier, $component= '', $a=NULL, $lang=NULL)
 string_exists ($identifier, $component)
 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)
 load_component_strings ($component, $lang, $disablecache=false, $disablelocal=false)
 reset_caches ()

Detailed Description

Definition at line 5981 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.

Implemented in install_string_manager, and core_string_manager.

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

Implemented in install_string_manager, and core_string_manager.

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

Implemented in install_string_manager, and core_string_manager.

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

Implemented in install_string_manager, and core_string_manager.

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 !

Implemented in install_string_manager, and core_string_manager.

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

Implemented in install_string_manager, and core_string_manager.

Invalidates all caches, should the implementation use any

Implemented in install_string_manager, and core_string_manager.

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

Implemented in install_string_manager, and core_string_manager.

translation_exists ( lang,
includeall = true 
)

Does the translation exist?

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

Implemented in install_string_manager, and core_string_manager.


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