Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changes to support choice of language direction (so that languages

like Arabic, Hebrew etc will work)
  • Loading branch information...
commit 541117b6cb7f59f395685f1309edc98c612bdec0 1 parent 4b93189
moodler authored
18 admin/config.html
View
@@ -29,6 +29,20 @@
</TD>
</TR>
<TR VALIGN=TOP>
+ <TD ALIGN=RIGHT><P>langdir:</TD>
+ <TD>
+ <? unset($options);
+ $options["LTR"] = get_string("langltr");
+ $options["RTL"] = get_string("langrtl");
+
+ choose_from_menu ($options, "langdir", $config->langdir, "", "", "");
+ ?>
+ </TD>
+ <TD>
+ <? print_string("configlangdir") ?>
+ </TD>
+</TR>
+<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P>locale:</TD>
<TD>
<INPUT NAME=locale TYPE=text SIZE=10 VALUE="<?=$config->locale?>">
@@ -51,14 +65,14 @@
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P>gdversion:</TD>
<TD>
- <? $options[0] = get_string("gdnot");
+ <? unset($options);
+ $options[0] = get_string("gdnot");
$options[1] = get_string("gd1");
$options[2] = get_string("gd2");
$installed = check_gd_version();
choose_from_menu ($options, "gdversion", $installed, "", "", "");
- unset($options);
?>
</TD>
<TD>
1  lib/defaults.php
View
@@ -6,6 +6,7 @@
$defaults = array (
"theme" => "standard",
"lang" => "en",
+ "langdir" => "LTR",
"locale" => "en",
"auth" => "email",
"smtphosts" => "",
6 lib/moodlelib.php
View
@@ -46,6 +46,12 @@ function print_header ($title="", $heading="", $navigation="", $focus="", $meta=
} else {
$meta .= "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=".get_string("thischarset")."\">\n";
}
+
+ if ($CFG->langdir == "RTL") {
+ $direction = " DIR=\"RTL\"";
+ } else {
+ $direction = " DIR=\"LTR\"";
+ }
if (!$cache) { // Do everything we can to prevent clients and proxies caching
@header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
2  theme/standard/header.html
View
@@ -1,4 +1,4 @@
-<HTML>
+<HTML<?=$direction?>>
<HEAD>
<TITLE><?=$title ?></TITLE>
<META NAME="keywords" CONTENT="Moodle, <?=$title ?> ">
2  theme/standardblue/header.html
View
@@ -1,4 +1,4 @@
-<HTML>
+<HTML<?=$direction?>>
<HEAD>
<TITLE><?=$title ?></TITLE>
<META NAME="keywords" CONTENT="Moodle, <?=$title ?> ">
2  theme/standardgreen/header.html
View
@@ -1,4 +1,4 @@
-<HTML>
+<HTML<?=$direction?>>
<HEAD>
<TITLE><?=$title ?></TITLE>
<META NAME="keywords" CONTENT="Moodle, <?=$title ?> ">
2  theme/standardlogo/header.html
View
@@ -1,4 +1,4 @@
-<HTML>
+<HTML<?=$direction?>>
<HEAD>
<TITLE><?=$title ?></TITLE>
<META NAME="keywords" CONTENT="Moodle, <?=$title ?> ">
2  theme/standardred/header.html
View
@@ -1,4 +1,4 @@
-<HTML>
+<HTML<?=$direction?>>
<HEAD>
<TITLE><?=$title ?></TITLE>
<META NAME="keywords" CONTENT="Moodle, <?=$title ?> ">
Please sign in to comment.
Something went wrong with that request. Please try again.