MDL-14743 offer a link to the English help file. Merged from 1.9 stable

This commit is contained in:
mudrd8mz 2009-03-02 14:14:19 +00:00
parent e05c43f2b6
commit 9dc1fb4dde
2 changed files with 22 additions and 1 deletions

View File

@ -161,7 +161,27 @@ if (!$helpfound) {
// End of page.
close_window_button();
echo '<p class="helpindex"><a href="help.php?file=index.html">'. get_string('helpindex') .'</a></p>';
echo '<p class="helpindex"><a href="help.php?file=index.html">'. get_string('helpindex') .'</a>';
// 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&amp;" : '';
$linklang .= !empty($file) ? "file=$file&amp;" : '';
$linklang .= !empty($skiplocal) ? "skiplocal=$skiplocal&amp;" : '';
if (empty($forcelang) or $forcelang === current_language()) {
$nextlang = 'en_utf8';
$nextlangname = 'English';
} else {
$nextlang = current_language();
$nextlangname = get_string('thislanguage');
}
$linklang .= "forcelang=$nextlang";
echo "<br /><a href=\"$linklang\">" . get_string('showthishelpinlanguage', 'moodle', $nextlangname) . '</a>';
}
echo '</p>';
$CFG->docroot = ''; // We don't want a doc link here
print_footer('none');

View File

@ -1423,6 +1423,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['showtopicfromothers'] = 'Show topic from others';
$string['showweekfromothers'] = 'Show week from others';
$string['since'] = 'Since';