Lang import controller.  
 More...
 | 
| 
array  | $availablelangs | 
|   | languages available on the remote server 
  | 
|   | 
| 
array  | $errors | 
|   | list of error messages 
  | 
|   | 
| 
array  | $info | 
|   | list of informational messages 
  | 
|   | 
Lang import controller. 
- Copyright
 - 2014 Dan Poltawski dan@m.nosp@m.oodl.nosp@m.e.com 
 
- License
 - http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
 
 
◆ install_languagepacks()
      
        
          | tool_langimport\controller::install_languagepacks  | 
          ( | 
            | 
          $langs,  | 
        
        
           | 
           | 
            | 
          $updating = false  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Install language packs provided. 
- Parameters
 - 
  
    | string | array | $langs | array of langcodes or individual langcodes  | 
    | bool | $updating | true if updating the langpacks  | 
  
   
- Return values
 - 
  
    | int | false if an error encountered or  | 
  
   
- Exceptions
 - 
  
  
 
 
 
◆ is_installed_lang()
      
        
          | tool_langimport\controller::is_installed_lang  | 
          ( | 
            | 
          $lang,  | 
        
        
           | 
           | 
            | 
          $md5check  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
checks the md5 of the zip file, grabbed from download.moodle.org, against the md5 of the local language file from last update 
- Parameters
 - 
  
    | string | $lang | language code  | 
    | string | $md5check | md5 to check  | 
  
   
- Return values
 - 
  
  
 
 
 
◆ lang_pack_url()
      
        
          | tool_langimport\controller::lang_pack_url  | 
          ( | 
            | 
          $langcode = '' | ) | 
           | 
        
      
 
Returns the URL where a given language pack can be downloaded. 
Alternatively, if the parameter is empty, returns URL of the page with the list of all available language packs.
- Parameters
 - 
  
    | string | $langcode | language code like 'cs' or empty for unknown  | 
  
   
- Return values
 - 
  
  
 
 
 
◆ uninstall_language()
      
        
          | tool_langimport\controller::uninstall_language  | 
          ( | 
            | 
          $lang | ) | 
           | 
        
      
 
Uninstall language pack. 
- Parameters
 - 
  
  
 
- Return values
 - 
  
    | bool | true if language succesfull installed  | 
  
   
 
 
◆ update_all_installed_languages()
      
        
          | tool_langimport\controller::update_all_installed_languages  | 
          ( | 
           | ) | 
           | 
        
      
 
Updated all install language packs with the latest found on servre. 
- Return values
 - 
  
    | bool | true if languages succesfully updated.  | 
  
   
 
 
The documentation for this class was generated from the following file: