diff -Naur gnome-doc-utils-0.14.0.orig/ChangeLog gnome-doc-utils-0.14.0/ChangeLog
--- gnome-doc-utils-0.14.0.orig/ChangeLog	2008-09-22 23:12:41.000000000 +0300
+++ gnome-doc-utils-0.14.0/ChangeLog	2008-12-06 13:10:22.000000000 +0200
@@ -1,3 +1,7 @@
+2008-12-06  Muayyad Saleh Alsadi  <alsadi@ojuba.org>
+
+	* fix RTL bugs
+
 2008-09-22  Shaun McCance  <shaunm@gnome.org>
 
 	* configure.in:
diff -Naur gnome-doc-utils-0.14.0.orig/xslt/docbook/html/db2html-css.xsl gnome-doc-utils-0.14.0/xslt/docbook/html/db2html-css.xsl
--- gnome-doc-utils-0.14.0.orig/xslt/docbook/html/db2html-css.xsl	2008-09-22 23:06:09.000000000 +0300
+++ gnome-doc-utils-0.14.0/xslt/docbook/html/db2html-css.xsl	2008-12-08 14:56:48.000000000 +0200
@@ -115,8 +115,7 @@
   border: solid 1px </xsl:text><xsl:value-of select="$theme.color.gray_border"/><xsl:text>;
 }
 div.body-sidebar {
-  <!-- FIXME: rtl -->
-  margin-right: 13em;
+  margin-</xsl:text><xsl:value-of select="$l10n.align.end"/><xsl:text>: 13em;
 }
 div.division div.division { margin-top: 1.72em; }
 div.division div.division div.division { margin-top: 1.44em; }
@@ -136,10 +135,8 @@
 .block { margin-top: 1em; }
 .block .block-first { margin-top: 0; }
 .block-indent {
-  <!-- FIXME: rtl -->
-  margin-left: 1.72em;
-  <!-- FIXME: rtl -->
-  margin-right: 1em;
+  margin-</xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>: 1.72em;
+  margin-</xsl:text><xsl:value-of select="$l10n.align.end"/><xsl:text>: 1em;
 }
 .block-indent .block-indent { margin-left: 0em; margin-right: 0em; }
 td .block-indent  { margin-left: 0em; margin-right: 0em; }
@@ -161,8 +158,7 @@
 ul, ol, dl { margin: 0; padding: 0; }
 li {
   margin-top: 1em;
-  <!-- FIXME: rtl -->
-  margin-left: 2.4em;
+  margin-</xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>: 2.4em;
   <!-- FIXME: rtl -->
   padding: 0;
 }
@@ -170,8 +166,7 @@
 dt { margin: 1em 0 0 0; }
 dt.dt-first { margin: 0; }
 dd {
-  <!-- FIXME: rtl -->
-  margin-left: 1.72em;
+  margin-</xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>: 1.72em;
   margin-top: 0.5em;
 }
 dl.dl-compact dt { margin-top: 0; }
@@ -181,8 +176,7 @@
 ul.linktrail {
   display: block;
   margin: 0.2em 0 0 0;
-  <!-- FIXME: rtl -->
-  text-align: right;
+  text-align: </xsl:text><xsl:value-of select="$l10n.align.end"/><xsl:text>;
 }
 li.linktrail { display: inline; margin: 0; padding: 0; }
 <!-- FIXME: rtl? -->
@@ -206,24 +200,22 @@
 table.navbar { width: 100%; margin: 0; border: none; }
 table.navbar td { padding: 0; border: none; }
 td.navbar-next {
-  <!-- FIXME: rtl -->
-  text-align: right;
+  text-align: </xsl:text><xsl:value-of select="$l10n.align.end"/><xsl:text>;
 }
 a.navbar-prev::before {
-  <!-- FIXME: rtl -->
-  content: '&#x25C0;&#x00A0;&#x00A0;';
+  padding-</xsl:text><xsl:value-of select="$l10n.align.end"/><xsl:text>: 0.2em;
+  content: '</xsl:text><xsl:value-of select="$l10n.arrow.prev"/><xsl:text>';
   color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>;
 }
 a.navbar-next::after {
-  <!-- FIXME: rtl -->
-  content: '&#x00A0;&#x00A0;&#x25B6;';
+  padding-</xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>: 0.2em;
+  content: '</xsl:text><xsl:value-of select="$l10n.arrow.next"/><xsl:text>';
   color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>;
 }
 
 <!-- == sidebar == -->
 div.sidebar {
-  <!-- FIXME: rtl -->
-  float: right;
+  float: </xsl:text><xsl:value-of select="$l10n.align.end"/><xsl:text>;
   padding: 0; margin: 0; width: 12em;
 }
 div.sidenav {
@@ -238,8 +230,7 @@
 div.sidenav div.autotoc div.autotoc { margin-top: 0.5em; }
 div.sidenav div.autotoc li { margin-bottom: 0.5em; }
 div.sidenav div.autotoc div.autotoc div.autotoc {
-  <!-- FIXME: rtl -->
-  margin-left: 1em;
+  margin-</xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>: 1em;
   margin-top: 0;
 }
 div.sidenav div.autotoc div.autotoc div.autotoc li { margin-bottom: 0; }
@@ -249,8 +240,7 @@
   <!-- FIXME: hack -->
   display: table;
   margin-top: 1em;
-  <!-- FIXME: rtl -->
-  margin-left: 1.72em;
+  margin-</xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>: 1.72em;
   padding: 0.5em 1em 0.5em 1em;
   background-color: </xsl:text><xsl:value-of select="$theme.color.blue_background"/><xsl:text>;
   border: solid 1px </xsl:text><xsl:value-of select="$theme.color.blue_border"/><xsl:text>;
@@ -267,15 +257,16 @@
 }
 
 <!-- == block == -->
+pre, code, tt {
+  direction: ltr;
+}
 div.admonition {
   padding: 0.5em 1em 0.5em 1em;
-  <!-- FIXME: rtl -->
-  padding-left: </xsl:text><xsl:value-of select="$theme.icon.admon.size + 12"/><xsl:text>px;
+  padding-</xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>: </xsl:text><xsl:value-of select="$theme.icon.admon.size + 12"/><xsl:text>px;
   min-height: </xsl:text><xsl:value-of select="$theme.icon.admon.size"/><xsl:text>px;
   border: solid 1px </xsl:text><xsl:value-of select="$theme.color.gray_border"/><xsl:text>;
   background-color: </xsl:text><xsl:value-of select="$theme.color.yellow_background"/><xsl:text>;
-  <!-- FIXME: rtl -->
-  background-position: 6px 0.5em;
+  background-position: </xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text> 0.5em;
   background-repeat: no-repeat;
 }
 div.caution {
@@ -300,11 +291,9 @@
   <!-- FIXME: i18n -->
   background-image: url('../../../data/icons/yelp-watermark-blockquote-201C.png');
   background-repeat: no-repeat;
-  <!-- FIXME: rtl -->
-  background-position: top left;
+  background-position: top </xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>;
   padding: 0.5em;
-  <!-- FIXME: rtl -->
-  padding-left: 4em;
+  padding-</xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>: 4em;
 }
 div.attribution {
   margin-top: 0.5em;
@@ -315,12 +304,9 @@
   content: '&#x2015; ';
 }
 div.epigraph {
-  <!-- FIXME: rtl -->
-  text-align: right;
-  <!-- FIXME: rtl -->
-  margin-left: 20%;
-  <!-- FIXME: rtl -->
-  margin-right: 0;
+  text-align: </xsl:text><xsl:value-of select="$l10n.align.end"/><xsl:text>;
+  margin-</xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>: 20%;
+  margin-</xsl:text><xsl:value-of select="$l10n.align.end"/><xsl:text>: 0;
   color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>;
 }
 div.figure, div.informalfigure {
@@ -358,12 +344,9 @@
 pre.linenumbering {
   color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>;
   margin: 0;
-  <!-- FIXME: rtl -->
-  padding-right: 1em;
-  <!-- FIXME: rtl -->
-  float: left;
-  <!-- FIXME: rtl -->
-  text-align: right;
+  padding-</xsl:text><xsl:value-of select="$l10n.align.end"/><xsl:text>: 1em;
+  float: </xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>;
+  text-align: </xsl:text><xsl:value-of select="$l10n.align.end"/><xsl:text>;
 }
 
 
@@ -379,7 +362,7 @@
 }
 div.simplelist {
   <!-- FIXME: rtl -->
-  margin-left: 1.72em;
+  margin-</xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>: 1.72em;
 }
 div.simplelist table { margin-left: 0; border: none; }
 div.simplelist td {
@@ -387,10 +370,8 @@
   border-left: solid 1px </xsl:text><xsl:value-of select="$theme.color.gray_border"/><xsl:text>;
 }
 div.simplelist td.td-first {
-  <!-- FIXME: rtl -->
-  padding-left: 0;
-  <!-- FIXME: rtl -->
-  border-left: 0;
+  padding-</xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>: 0;
+  border-</xsl:text><xsl:value-of select="$l10n.align.start"/><xsl:text>: 0;
 }
 div.synopsis {
   padding: 0.5em;
@@ -412,17 +393,17 @@
 span.application { font-style: italic; }
 span.classname, span.exceptionname, span.interfacename { font-family: monospace; }
 span.code {
+  direction: ltr;
   font-family: monospace;
   border: solid 1px </xsl:text><xsl:value-of select="$theme.color.gray_border"/><xsl:text>;
-  <!-- FIXME: rtl -->
   padding-left: 0.2em;
   padding-right: 0.2em;
 }
 pre span.code { border: none; padding: 0; }
 span.command {
+  direction: ltr;
   font-family: monospace;
   border: solid 1px </xsl:text><xsl:value-of select="$theme.color.gray_border"/><xsl:text>;
-  <!-- FIXME: rtl -->
   padding-left: 0.2em;
   padding-right: 0.2em;
 }
diff -Naur gnome-doc-utils-0.14.0.orig/xslt/gettext/gettext.xsl gnome-doc-utils-0.14.0/xslt/gettext/gettext.xsl
--- gnome-doc-utils-0.14.0.orig/xslt/gettext/gettext.xsl	2008-09-22 23:06:10.000000000 +0300
+++ gnome-doc-utils-0.14.0/xslt/gettext/gettext.xsl	2008-12-08 14:45:01.000000000 +0200
@@ -15,15 +15,32 @@
 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 02111-1307, USA.
 -->
-
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:msg="http://www.gnome.org/~shaunm/gnome-doc-utils/l10n"
                 version="1.0">
 
+<xsl:variable name="is_rtl">
+<xsl:choose>
+<xsl:when test="/*[@lang='ar']">true</xsl:when>
+<xsl:when test="/*[starts-with(@lang, 'ar_')]">true</xsl:when>
+<xsl:when test="/*[@lang='fa']">true</xsl:when>
+<xsl:when test="/*[starts-with(@lang, 'fa_')]">true</xsl:when>
+<xsl:when test="/*[@lang='he']">true</xsl:when>
+<xsl:when test="/*[starts-with(@lang, 'he_')]">true</xsl:when>
+<xsl:otherwise>false</xsl:otherwise>
+</xsl:choose>
+</xsl:variable>
+
+<xsl:param name="l10n.align.start"><xsl:choose><xsl:when test="$is_rtl='true'">right</xsl:when><xsl:otherwise>left</xsl:otherwise></xsl:choose></xsl:param>
+<xsl:param name="l10n.align.end"><xsl:choose><xsl:when test="$is_rtl='true'">left</xsl:when><xsl:otherwise>right</xsl:otherwise></xsl:choose></xsl:param>
+<xsl:param name="l10n.direction.start"><xsl:choose><xsl:when test="$is_rtl='true'">rtl</xsl:when><xsl:otherwise>ltr</xsl:otherwise></xsl:choose></xsl:param>
+<xsl:param name="l10n.direction.end"><xsl:choose><xsl:when test="$is_rtl='true'">ltr</xsl:when><xsl:otherwise>rtl</xsl:otherwise></xsl:choose></xsl:param>
+<xsl:param name="l10n.arrow.prev"><xsl:choose><xsl:when test="$is_rtl='true'">&#x00A0;&#x00A0;&#x25B6;</xsl:when><xsl:otherwise>&#x25C0;&#x00A0;&#x00A0;</xsl:otherwise></xsl:choose></xsl:param>
+<xsl:param name="l10n.arrow.next"><xsl:choose><xsl:when test="$is_rtl='true'">&#x25C0;&#x00A0;&#x00A0;</xsl:when><xsl:otherwise>&#x00A0;&#x00A0;&#x25B6;</xsl:otherwise></xsl:choose></xsl:param>
+
 <!--!!==========================================================================
 Localized Strings
 -->
-
 <xsl:variable name="l10n" select="document('l10n.xml')"/>
 <xsl:key name="msg" match="msg:msgset/msg:msg"
          use="concat(../msg:msgid, '__LC__', @xml:lang)"/>
@@ -788,7 +805,6 @@
   </xsl:choose>
 </xsl:template>
 
-
 <!--**==========================================================================
 l10n.language
 Extracts the langauge portion of a locale
