diff -uNr pango_origin/docs/pango-sections.txt pango_modify/docs/pango-sections.txt
--- pango_origin/docs/pango-sections.txt	2006-06-07 09:46:12.000000000 +0800
+++ pango_modify/docs/pango-sections.txt	2006-06-19 17:36:31.000000000 +0800
@@ -348,6 +348,7 @@
 pango_language_from_string
 pango_language_to_string
 pango_language_matches
+pango_get_default_language
 <SUBSECTION>
 PangoAttrList
 PANGO_TYPE_ATTR_LIST
diff -uNr pango_origin/pango/pango.def pango_modify/pango/pango.def
--- pango_origin/pango/pango.def	2006-05-23 10:29:39.000000000 +0800
+++ pango_modify/pango/pango.def	2006-06-19 17:36:17.000000000 +0800
@@ -189,6 +189,7 @@
 	pango_language_get_type
 	pango_language_includes_script
 	pango_language_matches
+	pango_get_default_language
 	pango_layout_context_changed
 	pango_layout_copy
 	pango_layout_get_alignment
diff -uNr pango_origin/pango/pango-types.h pango_modify/pango/pango-types.h
--- pango_origin/pango/pango-types.h	2006-04-30 11:38:02.000000000 +0800
+++ pango_modify/pango/pango-types.h	2006-06-19 17:36:17.000000000 +0800
@@ -188,6 +188,8 @@
 
 GType          pango_language_get_type    (void);
 PangoLanguage *pango_language_from_string (const char *language);
+PangoLanguage *pango_get_default_language (void);
+
 #define pango_language_to_string(language) ((const char *)language)
 
 gboolean      pango_language_matches  (PangoLanguage *language,
diff -uNr pango_origin/pango/pango-utils.c pango_modify/pango/pango-utils.c
--- pango_origin/pango/pango-utils.c	2006-06-05 09:34:25.000000000 +0800
+++ pango_modify/pango/pango-utils.c	2006-06-19 17:36:17.000000000 +0800
@@ -24,6 +24,7 @@
 #include <math.h>
 #include <string.h>
 #include <stdlib.h>
+#include <locale.h>
 
 #include "pango-font.h"
 #include "pango-impl-utils.h"
@@ -1218,6 +1219,93 @@
 }
 
 /**
+ * _pango_get_lc_ctype:
+ *
+ * Return the Unix-style locale string for the language currently in
+ * effect. On Unix systems, this is the return value from
+ * <literal>setlocale(LC_CTYPE, NULL)</literal>, and the user can
+ * affect this through the environment variables LC_ALL, LC_CTYPE or
+ * LANG (checked in that order). The locale strings typically is in
+ * the form lang_COUNTRY, where lang is an ISO-639 language code, and
+ * COUNTRY is an ISO-3166 country code. For instance, sv_FI for
+ * Swedish as written in Finland or pt_BR for Portuguese as written in
+ * Brazil.
+ * 
+ * On Windows, the C library doesn't use any such environment
+ * variables, and setting them won't affect the behaviour of functions
+ * like ctime(). The user sets the locale through the Regional Options 
+ * in the Control Panel. The C library (in the setlocale() function) 
+ * does not use country and language codes, but country and language 
+ * names spelled out in English. 
+ * However, this function does check the above environment
+ * variables, and does return a Unix-style locale string based on
+ * either said environment variables or the thread's current locale.
+ *
+ * Return value: a dynamically allocated string, free with g_free().
+ */
+static gchar *
+_pango_get_lc_ctype (void)
+{
+#ifdef G_OS_WIN32
+  /* Somebody might try to set the locale for this process using the
+   * LANG or LC_ environment variables. The Microsoft C library
+   * doesn't know anything about them. You set the locale in the
+   * Control Panel. Setting these env vars won't have any affect on
+   * locale-dependent C library functions like ctime(). But just for
+   * kicks, do obey LC_ALL, LC_CTYPE and LANG in Pango. (This also makes
+   * it easier to test GTK and Pango in various default languages, you
+   * don't have to clickety-click in the Control Panel, you can simply
+   * start the program with LC_ALL=something on the command line.)
+   */
+
+  gchar *p;
+
+  p = getenv ("LC_ALL");
+  if (p != NULL)
+    return g_strdup (p);
+
+  p = getenv ("LC_CTYPE");
+  if (p != NULL)
+    return g_strdup (p);
+
+  p = getenv ("LANG");
+  if (p != NULL)
+    return g_strdup (p);
+
+  return g_win32_getlocale ();
+#else
+  return g_strdup (setlocale (LC_CTYPE, NULL));
+#endif
+}
+
+/**
+ * pango_get_default_language:
+ *
+ * Returns the #PangoLanguage for the default language currently in
+ * effect. (Note that this can change over the life of an
+ * application.)  The default language is derived from the current
+ * locale. It determines, for example, whether pango uses the
+ * right-to-left or left-to-right text direction. See
+ * _pango_get_lc_ctype() for notes on behaviour on Windows.
+ * 
+ * Return value: the default language as a #PangoLanguage, must not be
+ * freed
+ **/
+PangoLanguage *
+pango_get_default_language (void)
+{
+  gchar *lang;
+  PangoLanguage *result;  
+  
+  lang = _pango_get_lc_ctype ();
+ 
+  result = pango_language_from_string (lang);
+  g_free (lang);
+  
+  return result;
+}
+
+/**
  * pango_language_from_string:
  * @language: a string representing a language tag
  * 
