summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/print-rtl.css8
-rw-r--r--misc/print.css2
-rw-r--r--modules/book/book.module8
3 files changed, 15 insertions, 3 deletions
diff --git a/misc/print-rtl.css b/misc/print-rtl.css
new file mode 100644
index 000000000..ee496e4a9
--- /dev/null
+++ b/misc/print-rtl.css
@@ -0,0 +1,8 @@
+/* $Id$ */
+
+body {
+ direction: rtl;
+}
+th {
+ text-align: right;
+}
diff --git a/misc/print.css b/misc/print.css
index 6b1e57218..894f6e44b 100644
--- a/misc/print.css
+++ b/misc/print.css
@@ -5,7 +5,7 @@ body {
background-color: #fff;
}
th {
- text-align: left;
+ text-align: left; /* LTR */
color: #006;
border-bottom: 1px solid #ccc;
}
diff --git a/modules/book/book.module b/modules/book/book.module
index a9bacb869..5f6b4abd0 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -702,13 +702,17 @@ function book_export_html($nid, $depth) {
* @ingroup themeable
*/
function theme_book_export_html($title, $content) {
- global $base_url;
+ global $base_url, $language;
$html = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
$html .= '<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">';
$html .= "<head>\n<title>". $title ."</title>\n";
$html .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
$html .= '<base href="'. $base_url .'/" />'."\n";
- $html .= "<style type=\"text/css\">\n@import url(misc/print.css);\n</style>\n";
+ $html .= "<style type=\"text/css\">\n@import url(misc/print.css);\n";
+ if ($language->direction == LANGUAGE_RTL) {
+ $html .= "@import url(misc/print-rtl.css);\n";
+ }
+ $html .= "</style>\n";
$html .= "</head>\n<body>\n". $content ."\n</body>\n</html>\n";
return $html;
}