From 541117b6cb7f59f395685f1309edc98c612bdec0 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 11 Oct 2002 02:31:37 +0000 Subject: [PATCH] Changes to support choice of language direction (so that languages like Arabic, Hebrew etc will work) --- admin/config.html | 18 ++++++++++++++++-- lib/defaults.php | 1 + lib/moodlelib.php | 6 ++++++ theme/standard/header.html | 2 +- theme/standardblue/header.html | 2 +- theme/standardgreen/header.html | 2 +- theme/standardlogo/header.html | 2 +- theme/standardred/header.html | 2 +- 8 files changed, 28 insertions(+), 7 deletions(-) diff --git a/admin/config.html b/admin/config.html index 645a409ecb..89a8496924 100644 --- a/admin/config.html +++ b/admin/config.html @@ -28,6 +28,20 @@ + +

langdir: + + langdir, "", "", ""); + ?> + + + + +

locale: @@ -51,14 +65,14 @@

gdversion: - diff --git a/lib/defaults.php b/lib/defaults.php index 010d2ff0e6..602d2125bd 100644 --- a/lib/defaults.php +++ b/lib/defaults.php @@ -6,6 +6,7 @@ $defaults = array ( "theme" => "standard", "lang" => "en", + "langdir" => "LTR", "locale" => "en", "auth" => "email", "smtphosts" => "", diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 26e5a3b93a..ea013a4d14 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -46,6 +46,12 @@ function print_header ($title="", $heading="", $navigation="", $focus="", $meta= } else { $meta .= "\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"); diff --git a/theme/standard/header.html b/theme/standard/header.html index 89497488d3..c39fb09991 100644 --- a/theme/standard/header.html +++ b/theme/standard/header.html @@ -1,4 +1,4 @@ - +> <?=$title ?> diff --git a/theme/standardblue/header.html b/theme/standardblue/header.html index 39ab1588ef..487eb4168b 100644 --- a/theme/standardblue/header.html +++ b/theme/standardblue/header.html @@ -1,4 +1,4 @@ - +> <?=$title ?> diff --git a/theme/standardgreen/header.html b/theme/standardgreen/header.html index d566255c4c..524a2ddbbf 100644 --- a/theme/standardgreen/header.html +++ b/theme/standardgreen/header.html @@ -1,4 +1,4 @@ - +> <?=$title ?> diff --git a/theme/standardlogo/header.html b/theme/standardlogo/header.html index 5d36688e77..94cea8fa51 100644 --- a/theme/standardlogo/header.html +++ b/theme/standardlogo/header.html @@ -1,4 +1,4 @@ - +> <?=$title ?> diff --git a/theme/standardred/header.html b/theme/standardred/header.html index e250dcad1a..0ed3f35285 100644 --- a/theme/standardred/header.html +++ b/theme/standardred/header.html @@ -1,4 +1,4 @@ - +> <?=$title ?> -- 2.39.5