Index: xslt/docbook/html/db2html-css.xsl
===================================================================
RCS file: /cvs/gnome/gnome-doc-utils/xslt/docbook/html/db2html-css.xsl,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- xslt/docbook/html/db2html-css.xsl	25 Nov 2005 20:20:15 -0000	1.19
+++ xslt/docbook/html/db2html-css.xsl	7 Jan 2006 18:09:39 -0000	1.20
@@ -44,8 +44,11 @@
     <xsl:call-template name="db2html.refentry.css"/>
     <xsl:call-template name="db2html.table.css"/>
     <xsl:call-template name="db2html.title.css"/>
+    <xsl:text>
     body {
       margin: 0px;
+      direction: </xsl:text>
+      <xsl:call-template name="l10n.direction"/><xsl:text>;
     }
     div[class ~= "body"] {
       padding: 12px;
@@ -83,6 +86,7 @@
     p &gt; div { margin-top: 1em; margin-bottom: 1em; }
     p &gt; div + div { margin-top: 0em; }
     p { text-align: justify; }
+    </xsl:text>
     <xsl:call-template name="db2html.css.custom"/>
   </style>
 </xsl:template>
Index: xslt/gettext/gettext.xsl
===================================================================
RCS file: /cvs/gnome/gnome-doc-utils/xslt/gettext/gettext.xsl,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- xslt/gettext/gettext.xsl	17 Jul 2005 07:48:15 -0000	1.20
+++ xslt/gettext/gettext.xsl	7 Jan 2006 18:09:39 -0000	1.21
@@ -767,6 +767,88 @@
 </xsl:template>
 
 
+<!-- == l10n.direction ===================================================== -->
+
+<template xmlns="http://www.gnome.org/~shaunm/xsldoc">
+  <name>l10n.direction</name>
+  <purpose>
+    Determine the text direction for the language of the document
+  </purpose>
+  <parameter>
+    <name>lang</name>
+    <purpose>
+      The locale to use when determining the direction
+    </purpose>
+  </parameter>
+  <parameter>
+    <name>lang_language</name>
+    <purpose>
+      The language portion of the locale to use
+    </purpose>
+  </parameter>
+  <parameter>
+    <name>lang_region</name>
+    <purpose>
+      The region portion of the locale to use
+    </purpose>
+  </parameter>
+  <parameter>
+    <name>lang_variant</name>
+    <purpose>
+      The variant portion of the locale to use
+    </purpose>
+  </parameter>
+  <parameter>
+    <name>lang_charset</name>
+    <purpose>
+      The charset portion of the locale to use
+    </purpose>
+  </parameter>
+</template>
+
+<xsl:template name="l10n.direction">
+  <xsl:param name="lang" select="$l10n.locale"/>
+  <xsl:param name="lang_language">
+    <xsl:call-template name="l10n.language">
+      <xsl:with-param name="lang" select="$lang"/>
+    </xsl:call-template>
+  </xsl:param>
+  <xsl:param name="lang_region">
+    <xsl:call-template name="l10n.region">
+      <xsl:with-param name="lang" select="$lang"/>
+    </xsl:call-template>
+  </xsl:param>
+  <xsl:param name="lang_variant">
+    <xsl:call-template name="l10n.variant">
+      <xsl:with-param name="lang" select="$lang"/>
+    </xsl:call-template>
+  </xsl:param>
+  <xsl:param name="lang_charset">
+    <xsl:call-template name="l10n.charset">
+      <xsl:with-param name="lang" select="$lang"/>
+    </xsl:call-template>
+  </xsl:param>
+  <xsl:variable name="direction">
+    <xsl:call-template name="l10n.gettext">
+      <xsl:with-param name="msgid" select="'ltr'"/>
+      <xsl:with-param name="lang" select="$lang"/>
+      <xsl:with-param name="lang_language" select="$lang_language"/>
+      <xsl:with-param name="lang_region"   select="$lang_region"/>
+      <xsl:with-param name="lang_variant"  select="$lang_variant"/>
+      <xsl:with-param name="lang_charset"  select="$lang_charset"/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$direction = 'rtl'">
+      <xsl:text>rtl</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>ltr</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
 <!-- == l10n.language =============================================== -->
 
 <template xmlns="http://www.gnome.org/~shaunm/xsldoc">
Index: xslt/gettext/l10n.xml.in
===================================================================
RCS file: /cvs/gnome/gnome-doc-utils/xslt/gettext/l10n.xml.in,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- xslt/gettext/l10n.xml.in	25 Nov 2005 20:20:16 -0000	1.15
+++ xslt/gettext/l10n.xml.in	7 Jan 2006 18:09:39 -0000	1.16
@@ -6,6 +6,15 @@
 <!-- == Simple Strings ===================================================== -->
 
 <msgset>
+  <msgid>ltr</msgid>
+  <!--
+  The string determines the text direction of the formatted output.
+  If your language reads right-to-left, translatet this string to
+  rtl.  Otherwise, leave it as ltr.
+  -->
+  <_msg>ltr</_msg>
+</msgset>
+<msgset>
   <msgid>, </msgid>
   <!--
   This is used a simple list item seperator in places where simple
