Interface for string manager.  
 More...
 | 
|   | get_list_of_countries ($returnall=false, $lang=null) | 
|   | Returns a localised list of all country names, sorted by country keys.  More...
  | 
|   | 
|   | get_list_of_currencies ($lang=null) | 
|   | Returns localised list of currencies.  More...
  | 
|   | 
|   | get_list_of_languages ($lang=null, $standard='iso6392') | 
|   | Returns a localised list of languages, sorted by code keys.  More...
  | 
|   | 
|   | get_list_of_translations ($returnall=false) | 
|   | Returns localised list of installed translations.  More...
  | 
|   | 
|   | get_revision () | 
|   | Returns string revision counter, this is incremented after any string cache reset.  More...
  | 
|   | 
|   | get_string ($identifier, $component='', $a=null, $lang=null) | 
|   | Get String returns a requested string.  More...
  | 
|   | 
|   | load_component_strings ($component, $lang, $disablecache=false, $disablelocal=false) | 
|   | Load all strings for one component.  More...
  | 
|   | 
|   | reset_caches ($phpunitreset=false) | 
|   | Invalidates all caches, should the implementation use any.  More...
  | 
|   | 
|   | string_deprecated ($identifier, $component) | 
|   | Has string been deprecated?  More...
  | 
|   | 
|   | string_exists ($identifier, $component) | 
|   | Does the string actually exist?  More...
  | 
|   | 
|   | translation_exists ($lang, $includeall=true) | 
|   | Checks if the translation exists for the language.  More...
  | 
|   | 
Interface for string manager. 
Interface describing class which is responsible for getting of localised strings from language packs.
- Copyright
 - 2010 Petr Skoda  
 
- License
 - http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
 
 
◆ get_list_of_countries()
      
        
          | core_string_manager::get_list_of_countries  | 
          ( | 
            | 
          $returnall = false,  | 
        
        
           | 
           | 
            | 
          $lang = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Returns a localised list of all country names, sorted by country keys. 
- Parameters
 - 
  
    | bool | $returnall | return all or just enabled  | 
    | string | $lang | moodle translation language, null means use current  | 
  
   
- Return values
 - 
  
    | array | two-letter country code => translated name.  | 
  
   
Implemented in core_string_manager_install, and core_string_manager_standard.
 
 
◆ get_list_of_currencies()
      
        
          | core_string_manager::get_list_of_currencies  | 
          ( | 
            | 
          $lang = null | ) | 
           | 
        
      
 
 
◆ get_list_of_languages()
      
        
          | core_string_manager::get_list_of_languages  | 
          ( | 
            | 
          $lang = null,  | 
        
        
           | 
           | 
            | 
          $standard = 'iso6392'  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Returns a localised list of languages, sorted by code keys. 
- Parameters
 - 
  
    | string | $lang | moodle translation language, null means use current  | 
    | string | $standard | language list standard iso6392: three-letter language code (ISO 639-2/T) => translated name.  | 
  
   
- Return values
 - 
  
    | array | language code => translated name  | 
  
   
Implemented in core_string_manager_standard, and core_string_manager_install.
 
 
◆ get_list_of_translations()
      
        
          | core_string_manager::get_list_of_translations  | 
          ( | 
            | 
          $returnall = false | ) | 
           | 
        
      
 
 
◆ get_revision()
      
        
          | core_string_manager::get_revision  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ get_string()
      
        
          | core_string_manager::get_string  | 
          ( | 
            | 
          $identifier,  | 
        
        
           | 
           | 
            | 
          $component = '',  | 
        
        
           | 
           | 
            | 
          $a = null,  | 
        
        
           | 
           | 
            | 
          $lang = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Get String returns a requested string. 
- Parameters
 - 
  
    | 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  | 
  
   
- Return values
 - 
  
  
 
Implemented in core_string_manager_install, and core_string_manager_standard.
 
 
◆ load_component_strings()
      
        
          | core_string_manager::load_component_strings  | 
          ( | 
            | 
          $component,  | 
        
        
           | 
           | 
            | 
          $lang,  | 
        
        
           | 
           | 
            | 
          $disablecache = false,  | 
        
        
           | 
           | 
            | 
          $disablelocal = false  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Load all strings for one component. 
- Parameters
 - 
  
    | 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  | 
  
   
- Return values
 - 
  
    | array | of all string for given component and lang  | 
  
   
Implemented in core_string_manager_install, and core_string_manager_standard.
 
 
◆ reset_caches()
      
        
          | core_string_manager::reset_caches  | 
          ( | 
            | 
          $phpunitreset = false | ) | 
           | 
        
      
 
 
◆ string_deprecated()
      
        
          | core_string_manager::string_deprecated  | 
          ( | 
            | 
          $identifier,  | 
        
        
           | 
           | 
            | 
          $component  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ string_exists()
      
        
          | 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 | $identifier | The identifier of the string to search for  | 
    | string | $component | The module the string is associated with  | 
  
   
- Return values
 - 
  
  
 
Implemented in core_string_manager_install, and core_string_manager_standard.
 
 
◆ translation_exists()
      
        
          | core_string_manager::translation_exists  | 
          ( | 
            | 
          $lang,  | 
        
        
           | 
           | 
            | 
          $includeall = true  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
The documentation for this interface was generated from the following file:
- lib/classes/string_manager.php