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 '

'. get_string('helpindex') .'

'; +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 '

'; $CFG->docroot = ''; // We don't want a doc link here print_footer('none'); diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index a3a2960..5f76061 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -1388,6 +1388,7 @@ $string['showrecent'] = 'Show recent activity'; $string['showreports'] = 'Show activity reports'; $string['showsettings'] = 'Show settings'; $string['showtheselogs'] = 'Show these logs'; +$string['showthishelpinlanguage'] = 'Show this help in language: $a'; $string['since'] = 'Since'; $string['sincelast'] = 'since last login'; $string['site'] = 'Site';