|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
Collaboration diagram for ilPluginLanguage:Public Member Functions | |
| __construct (ilPluginInfo $plugin_info) | |
| getAvailableLangFiles () | |
| Get array of all language files in the plugin. More... | |
| hasAvailableLangFiles () | |
| getPrefix () | |
| updateLanguages (?array $a_lang_keys=null) | |
| uninstall () | |
| loadLanguageModule () | |
| Load language module for plugin. More... | |
| txt (string $a_var) | |
| Get Language Variable (prefix will be prepended automatically) More... | |
Protected Member Functions | |
| getLanguageDirectory () | |
Protected Attributes | |
| ilPluginInfo | $plugin_info |
Private Member Functions | |
| readLangFile (string $file) | |
| Key (without the plugin prefix) => value. More... | |
| logShippedViolations (string $file, array $values) | |
| Logs every value with disallowed markup, changes nothing. More... | |
| cleanShippedValues (string $file, array $values) | |
| Removes disallowed markup and logs what was removed. More... | |
| readPoFile (string $file) | |
Key (msgid, without the plugin prefix) => value, null if the file cannot be read (logged, the update goes on with the other languages). More... | |
Static Private Member Functions | |
| static | logWarning (string $message) |
| Falls back to the PHP error log (e.g. More... | |
Definition at line 32 of file class.ilPluginLanguage.php.
| ilPluginLanguage::__construct | ( | ilPluginInfo | $plugin_info | ) |
Definition at line 36 of file class.ilPluginLanguage.php.
References $plugin_info.
|
private |
Removes disallowed markup and logs what was removed.
| array<string,string> | $values key => value |
Definition at line 202 of file class.ilPluginLanguage.php.
References $policy, and logWarning().
Referenced by readPoFile().
Here is the call graph for this function:
Here is the caller graph for this function:| ilPluginLanguage::getAvailableLangFiles | ( | ) |
Get array of all language files in the plugin.
A language may be shipped as ilias_<lang>.po instead of .lang (see readPoFile()); if both exist, the .po is used.
Definition at line 53 of file class.ilPluginLanguage.php.
References $lang_files, and getLanguageDirectory().
Referenced by hasAvailableLangFiles(), and updateLanguages().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 41 of file class.ilPluginLanguage.php.
Referenced by getAvailableLangFiles(), and updateLanguages().
Here is the caller graph for this function:| ilPluginLanguage::getPrefix | ( | ) |
Definition at line 95 of file class.ilPluginLanguage.php.
References XapiProxy\$plugin, and $plugin_info.
Referenced by loadLanguageModule(), txt(), uninstall(), and updateLanguages().
Here is the caller graph for this function:| ilPluginLanguage::hasAvailableLangFiles | ( | ) |
Definition at line 90 of file class.ilPluginLanguage.php.
References getAvailableLangFiles().
Here is the call graph for this function:| ilPluginLanguage::loadLanguageModule | ( | ) |
Load language module for plugin.
Definition at line 368 of file class.ilPluginLanguage.php.
References $DIC, $lng, and getPrefix().
Referenced by txt().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Logs every value with disallowed markup, changes nothing.
| array<string,string> | $values key => value |
Definition at line 184 of file class.ilPluginLanguage.php.
References logWarning().
Referenced by readLangFile().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Falls back to the PHP error log (e.g.
in Setup): a plugin language update must not fail because it cannot log.
Definition at line 288 of file class.ilPluginLanguage.php.
References $DIC, and $message.
Referenced by cleanShippedValues(), logShippedViolations(), and readPoFile().
Here is the caller graph for this function:
|
private |
Key (without the plugin prefix) => value.
Disallowed markup is only logged (see logShippedViolations()), unlike for a .po (see readPoFile()), whose values are cleaned.
Definition at line 161 of file class.ilPluginLanguage.php.
References Vendor\Package\$a, and logShippedViolations().
Referenced by updateLanguages().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Key (msgid, without the plugin prefix) => value, null if the file cannot be read (logged, the update goes on with the other languages).
Only entries without msgctxt are read: the file belongs to the plugin's module, whose name (the prefix) must not appear in it, as it changes when the plugin becomes a component. Entries with a msgctxt, even an empty one, are ignored and logged. Disallowed markup is cleaned (and logged) like the build does for a component's shipped .po. Extracted comments are not stored. Fuzzy entries are read, untranslated ones not. A plural message is read with its default form (see PluralForms) and logged: plugins are served from the database, which holds one value per key.
Definition at line 231 of file class.ilPluginLanguage.php.
References Vendor\Package\$e, $message, cleanShippedValues(), and logWarning().
Referenced by updateLanguages().
Here is the call graph for this function:
Here is the caller graph for this function:| ilPluginLanguage::txt | ( | string | $a_var | ) |
Get Language Variable (prefix will be prepended automatically)
Definition at line 381 of file class.ilPluginLanguage.php.
References $DIC, $lng, $text, ilLanguage\_lookupEntry(), getPrefix(), and loadLanguageModule().
Here is the call graph for this function:| ilPluginLanguage::uninstall | ( | ) |
Definition at line 299 of file class.ilPluginLanguage.php.
References $DIC, $ilDB, and getPrefix().
Here is the call graph for this function:| ilPluginLanguage::updateLanguages | ( | ?array | $a_lang_keys = null | ) |
Definition at line 109 of file class.ilPluginLanguage.php.
References ilObjLanguage\_getLocalChangesByModule(), getAvailableLangFiles(), ilObjLanguage\getLangKeysOfInstalledLanguages(), getLanguageDirectory(), getPrefix(), readLangFile(), readPoFile(), ilObjLanguage\replaceLangEntry(), and ilObjLanguage\replaceLangModule().
Here is the call graph for this function:
|
protected |
Definition at line 34 of file class.ilPluginLanguage.php.
Referenced by __construct(), and getPrefix().