(no description)
Copyright: | Gaetan Frenoy <gaetan@frenoy.net> |
Copyright: | 2004 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 134 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
filter_multilang:: (3 methods):
filter()
process_match()
get_parent_lang()
Class: filter_multilang - X-Ref
Implementation of the Moodle filter API for the Multi-lang filter.filter($text, array $options = array() X-Ref |
No description |
process_match(array $langblock) X-Ref |
This is the callback used by the preg_replace_callback call above. param: array $langblock one of the matches from the regex match. return: string the replacement string (one of the possible translations). |
get_parent_lang(string $lang) X-Ref |
Puts some caching around get_parent_language(). Also handle parent == 'en' in a way that works better for us. param: string $lang a Moodle language code, e.g. 'fr'. return: string the parent language. |