Lang import controller.
More...
|
|
| __construct () |
| | Constructor.
|
| |
| | install_languagepacks ($langs, $updating=false) |
| | Install language packs provided.
|
| |
| | 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
|
| |
| | lang_pack_url ($langcode='') |
| | Returns the URL where a given language pack can be downloaded.
|
| |
| | redirect (moodle_url $url) |
| | Redirect to the specified url, outputting any required messages.
|
| |
| | schedule_languagepacks_installation ($langs) |
| | Schedule installation of the given language packs asynchronously via ad hoc task.
|
| |
| | uninstall_language ($lang) |
| | Uninstall language pack.
|
| |
| | update_all_installed_languages () |
| | Updated all install language packs with the latest found on servre.
|
| |
|
|
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
-
| moodle_exception | when error is encountered installing langpack |
◆ 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
-
◆ redirect()
| tool_langimport\controller::redirect |
( |
moodle_url | $url | ) |
|
Redirect to the specified url, outputting any required messages.
- Parameters
-
◆ schedule_languagepacks_installation()
| tool_langimport\controller::schedule_languagepacks_installation |
( |
| $langs | ) |
|
Schedule installation of the given language packs asynchronously via ad hoc task.
- Parameters
-
| string | array | $langs | array of langcodes or individual langcodes |
◆ 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:
- admin/tool/langimport/classes/controller.php