diff --git a/help.php b/help.php index dc2f3de..6d1f942 100644 --- a/help.php +++ b/help.php @@ -127,7 +127,27 @@ if (!$helpfound) { // End of page. close_window_button(); -echo '
'; +echo ''. get_string('helpindex') .'';
+
+// Offer a link to the alternative help file language
+if (($helpfound) and (((current_language() != 'en_utf8') and $lang != 'en_utf8') or ($forcelang === 'en_utf8'))) {
+ $linklang = "{$CFG->wwwroot}/help.php?";
+ $linklang .= !empty($module) ? "module=$module&" : '';
+ $linklang .= !empty($file) ? "file=$file&" : '';
+ $linklang .= !empty($skiplocal) ? "skiplocal=$skiplocal&" : '';
+
+ if (empty($forcelang) or $forcelang === current_language()) {
+ $nextlang = 'en_utf8';
+ $nextlangname = 'English';
+ } else {
+ $nextlang = current_language();
+ $nextlangname = get_string('thislanguage');
+ }
+
+ $linklang .= "forcelang=$nextlang";
+ echo "
" . get_string('showthishelpinlanguage', 'moodle', $nextlangname) . '';
+}
+echo '