June 2017
Beginner to intermediate
368 pages
8h 31m
English
We will now need to update our overridden get_string() function (contained in \local\duallang\classes\duallang_string_manager) to utilize these new settings. Here is the modified code:
public function get_string($identifier, $component = '', $a = null, $lang = null) { $string = ''; // returns an empty string by default if(get_config('local_duallang', 'enabled')) { $order = get_config('local_duallang', 'readingorder'); $primarylang = parent::get_string($identifier, $component, $a, get_config('local_duallang', 'primarylanguage')); $secondarylang = parent::get_string($identifier, $component, $a, get_config('local_duallang', 'secondarylanguage')); // ordering is only left to right or right to left ...Read now
Unlock full access