Index: src/yelp-html.cpp
===================================================================
RCS file: /cvs/gnome/yelp/src/yelp-html.cpp,v
retrieving revision 1.3
diff -u -r1.3 yelp-html.cpp
--- src/yelp-html.cpp	11 Dec 2005 22:28:54 -0000	1.3
+++ src/yelp-html.cpp	6 Jan 2006 20:19:06 -0000
@@ -388,6 +388,18 @@
 }
 
 void
+yelp_html_set_direction (gboolean using_locale)
+{
+    gboolean rtl;
+
+    if (using_locale)
+	rtl = gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL;
+    else 
+	rtl = FALSE;
+    yelp_gecko_set_direction (rtl);
+}
+
+void
 yelp_html_print (YelpHtml *html, YelpPrintInfo *info, gboolean preview, gint *npages)
 {
     html->priv->yelper->Print (info, preview, npages);
Index: src/yelp-html.h
===================================================================
RCS file: /cvs/gnome/yelp/src/yelp-html.h,v
retrieving revision 1.31
diff -u -r1.31 yelp-html.h
--- src/yelp-html.h	11 Dec 2005 22:28:54 -0000	1.31
+++ src/yelp-html.h	6 Jan 2006 20:19:06 -0000
@@ -108,6 +108,7 @@
 void            yelp_html_preview_navigate (YelpHtml *html,
 					    gint page_no);
 void            yelp_html_initialize     (void);
+void            yelp_html_set_direction  (gboolean using_locale);
 
 G_END_DECLS
 
Index: src/yelp-window.c
===================================================================
RCS file: /cvs/gnome/yelp/src/yelp-window.c,v
retrieving revision 1.186
diff -u -r1.186 yelp-window.c
--- src/yelp-window.c	11 Dec 2005 22:28:54 -0000	1.186
+++ src/yelp-window.c	6 Jan 2006 20:19:08 -0000
@@ -786,7 +786,7 @@
 	g_free (priv->current_frag);
 
     action = gtk_action_group_get_action (priv->action_group, 
-						  "PrintDocument");
+					  "PrintDocument");
     g_object_set (G_OBJECT (action), "sensitive", FALSE, NULL);
 
 
@@ -826,6 +826,8 @@
     GError         *error = NULL;
     gboolean        handled = FALSE;
     gchar          *uri;
+    gchar          *language = NULL;
+    gboolean        locale = FALSE;
 
     g_return_if_fail (YELP_IS_WINDOW (window));
     g_return_if_fail (doc_info != NULL);
@@ -833,6 +835,13 @@
     d (g_print ("window_do_laod\n"));
 
     priv = window->priv;
+
+    language = (gchar *) yelp_doc_info_get_language (doc_info);
+
+    if (language && !g_str_equal (language, "C"))
+	locale = TRUE;
+
+    yelp_html_set_direction (locale);
 
     action = gtk_action_group_get_action (priv->action_group, 
 					  "PrintDocument");
Index: src/yelp-gecko-utils.cpp
===================================================================
RCS file: /cvs/gnome/yelp/src/yelp-gecko-utils.cpp,v
retrieving revision 1.14
diff -u -r1.14 yelp-gecko-utils.cpp
--- src/yelp-gecko-utils.cpp	2 Nov 2005 21:49:48 -0000	1.14
+++ src/yelp-gecko-utils.cpp	6 Jan 2006 20:19:08 -0000
@@ -102,6 +102,12 @@
 }
 
 extern "C" void
+yelp_gecko_set_direction (gboolean rtl)
+{
+gecko_prefs_set_int ("bidi.direction", rtl ? 2 : 1);
+}
+
+extern "C" void
 yelp_gecko_set_caret (gboolean value)
 {
 	gecko_prefs_set_bool ("accessibility.browsewithcaret", value);
Index: src/yelp-gecko-utils.h
===================================================================
RCS file: /cvs/gnome/yelp/src/yelp-gecko-utils.h,v
retrieving revision 1.8
diff -u -r1.8 yelp-gecko-utils.h
--- src/yelp-gecko-utils.h	16 May 2005 21:02:33 -0000	1.8
+++ src/yelp-gecko-utils.h	6 Jan 2006 20:19:08 -0000
@@ -28,11 +28,13 @@
 
 G_BEGIN_DECLS
 
-void            yelp_gecko_set_caret   (gboolean       value);
-void            yelp_gecko_set_color   (YelpColorType  type,
-					const gchar   *color);
-void            yelp_gecko_set_font    (YelpFontType   font_type,
-				        const gchar   *fontname);
+void            yelp_gecko_set_caret      (gboolean       value);
+void            yelp_gecko_set_color      (YelpColorType  type,
+					   const gchar   *color);
+void            yelp_gecko_set_font       (YelpFontType   font_type,
+					   const gchar   *fontname);
+void            yelp_gecko_set_direction  (gboolean       rtl);
+
 
 G_END_DECLS
 
