|
Moodle
2.2.1
http://www.collinsharper.com
|
Static Public Member Functions | |
| static | list_components () |
| static | checkout ($lang, progress_bar $progressbar=null) |
| static | checkin ($lang) |
| static | get_count_of_modified ($lang) |
| static | save_filter (stdclass $data, stdclass $persistant) |
| static | load_filter (stdclass $persistant) |
Data Fields | |
| const | ROUGH_NUMBER_OF_STRINGS = 16500 |
Static Protected Member Functions | |
| static | get_localpack_location ($lang) |
| static | dump_strings ($lang, $component, $strings) |
| static | get_component_filename ($component) |
Static Protected Attributes | |
| static | $components = null |
Provides various utilities to be used by the plugin
All the public methods here are static ones, this class can not be instantiated
Definition at line 33 of file locallib.php.
| static checkin | ( | $ | lang | ) | [static] |
Exports the translator database into disk files
| mixed | $lang | language code |
Definition at line 205 of file locallib.php.

| static checkout | ( | $ | lang, |
| progress_bar $ | progressbar = null |
||
| ) | [static] |
Updates the translator database with the strings from files
This should be executed each time before going to the translation page
| string | $lang | language code to checkout |
| progress_bar | $progressbar | optionally, the given progress bar can be updated |
Definition at line 93 of file locallib.php.

| static dump_strings | ( | $ | lang, |
| $ | component, | ||
| $ | strings | ||
| ) | [static, protected] |
Writes strings into a local language pack file
| string | $component | the name of the component |
| array | $strings |
Local language pack from $CFG->wwwroot
$packageinfo http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Definition at line 257 of file locallib.php.


| static get_component_filename | ( | $ | component | ) | [static, protected] |
Returns the name of the file where the component's local strings should be exported into
| string | $component | normalized name of the component, eg 'core' or 'mod_workshop' |
Definition at line 338 of file locallib.php.
| static get_count_of_modified | ( | $ | lang | ) | [static] |
Returns the number of modified strings checked out in the translator
| string | $lang | language code |
Definition at line 358 of file locallib.php.
| static get_localpack_location | ( | $ | lang | ) | [static, protected] |
Returns full path to the directory where local packs are dumped into
| string | $lang | language code |
Definition at line 245 of file locallib.php.

| static list_components | ( | ) | [static] |
Returns a list of all components installed on the server
Definition at line 55 of file locallib.php.


| static load_filter | ( | stdclass $ | persistant | ) | [static] |
Loads the previously saved filter settings from a persistent storage
| stdclass | $persistant | storage object |
Definition at line 389 of file locallib.php.
| static save_filter | ( | stdclass $ | data, |
| stdclass $ | persistant | ||
| ) | [static] |
Saves filter data into a persistant storage such as user session
| stdclass | $data | filter values |
| stdclass | $persistant | storage object |
Definition at line 371 of file locallib.php.
$components = null [static, protected] |
Definition at line 42 of file locallib.php.
| const ROUGH_NUMBER_OF_STRINGS = 16500 |
Rough number of strings that are being processed during a full checkout. This is used to estimate the progress of the checkout.
Definition at line 39 of file locallib.php.