Fetches minimum strings for installation.  
 More...
|  | 
|  | __construct () | 
|  | Crate new instance of install string manager. 
 | 
|  | 
|  | get_list_of_countries ($returnall=false, $lang=null) | 
|  | Returns a localised list of all country names, sorted by country keys. 
 | 
|  | 
|  | get_list_of_currencies ($lang=null) | 
|  | Returns localised list of currencies. 
 | 
|  | 
|  | get_list_of_languages ($lang=null, $standard='iso6392') | 
|  | Returns a localised list of languages, sorted by code keys. 
 | 
|  | 
|  | get_list_of_translations ($returnall=false) | 
|  | Returns localised list of installed translations. 
 | 
|  | 
|  | get_revision () | 
|  | Returns string revision counter, this is incremented after any string cache reset. 
 | 
|  | 
|  | get_string ($identifier, $component='', $a=null, $lang=null) | 
|  | Get String returns a requested string. 
 | 
|  | 
|  | load_component_strings ($component, $lang, $disablecache=false, $disablelocal=false) | 
|  | Load all strings for one component. 
 | 
|  | 
|  | reset_caches ($phpunitreset=false) | 
|  | This implementation does not use any caches. 
 | 
|  | 
|  | string_deprecated ($identifier, $component) | 
|  | Has string been deprecated? 
 | 
|  | 
|  | string_exists ($identifier, $component) | 
|  | Does the string actually exist? 
 | 
|  | 
|  | translation_exists ($lang, $includeall=true) | 
|  | Checks if the translation exists for the language. 
 | 
|  | 
|  | 
| string | $installroot | 
|  | location of pre-install packs for all langs 
 | 
|  | 
Fetches minimum strings for installation. 
Minimalistic string fetching implementation that is used in installer before we fetch the wanted language pack from moodle.org lang download site.
- Copyright
- 2010 Petr Skoda (http://skodak.org) 
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ get_list_of_countries()
      
        
          | core_string_manager_install::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. |  
 
Implements core_string_manager.
 
 
◆ get_list_of_currencies()
      
        
          | core_string_manager_install::get_list_of_currencies | ( |  | $lang = null | ) |  | 
      
 
Returns localised list of currencies. 
- Parameters
- 
  
    | string | $lang | moodle translation language, null means use current |  
 
- Return values
- 
  
    | array | currency code => localised currency name |  
 
Implements core_string_manager.
 
 
◆ get_list_of_languages()
      
        
          | core_string_manager_install::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 |  
 
Implements core_string_manager.
 
 
◆ get_list_of_translations()
      
        
          | core_string_manager_install::get_list_of_translations | ( |  | $returnall = false | ) |  | 
      
 
Returns localised list of installed translations. 
- Parameters
- 
  
    | bool | $returnall | return all or just enabled |  
 
- Return values
- 
  
    | array | moodle translation code => localised translation name |  
 
Implements core_string_manager.
 
 
◆ get_revision()
      
        
          | core_string_manager_install::get_revision | ( |  | ) |  | 
      
 
Returns string revision counter, this is incremented after any string cache reset. 
- Return values
- 
  
    | int | lang string revision counter, -1 if unknown |  
 
Implements core_string_manager.
 
 
◆ get_string()
      
        
          | core_string_manager_install::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
- 
  
  
Implements core_string_manager.
 
 
◆ load_component_strings()
      
        
          | core_string_manager_install::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 |  
 
Implements core_string_manager.
 
 
◆ reset_caches()
      
        
          | core_string_manager_install::reset_caches | ( |  | $phpunitreset = false | ) |  | 
      
 
This implementation does not use any caches. 
- Parameters
- 
  
    | bool | $phpunitreset | true means called from our PHPUnit integration test reset |  
 
Implements core_string_manager.
 
 
◆ string_deprecated()
      
        
          | core_string_manager_install::string_deprecated | ( |  | $identifier, | 
        
          |  |  |  | $component ) | 
      
 
Has string been deprecated? 
No deprecated string in installation, unused strings are simply removed.
- Parameters
- 
  
    | string | $identifier | The identifier of the string to search for |  | string | $component | The module the string is associated with |  
 
- Return values
- 
  
  
Implements core_string_manager.
 
 
◆ string_exists()
      
        
          | core_string_manager_install::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
- 
  
  
Implements core_string_manager.
 
 
◆ translation_exists()
      
        
          | core_string_manager_install::translation_exists | ( |  | $lang, | 
        
          |  |  |  | $includeall = true ) | 
      
 
Checks if the translation exists for the language. 
- Parameters
- 
  
    | string | $lang | moodle translation language code |  | bool | $includeall | include also disabled translations |  
 
- Return values
- 
  
  
Implements core_string_manager.
 
 
The documentation for this class was generated from the following file: