--- gdm-2.6.0.3/daemon/gdm.c	2005-03-10 16:34:02.000000000 -0800
+++ gdm-2.6.0.3-patch/daemon/gdm.c	2005-03-10 16:54:33.579783768 -0800
@@ -122,6 +122,7 @@
 unsigned char *gdm_global_bcookie = NULL;
 
 gchar *gdm_charset = NULL;
+char *gdm_system_locale = NULL; /* CR Id: 5032088 */
 
 int gdm_normal_runlevel = -1; /* runlevel on linux that gdm was started in */
 
@@ -2026,6 +2027,11 @@
 	    gdm_charset = g_strdup (charset);
     }
 
+    /* CR Id: 5032088 */
+    if (setlocale (LC_CTYPE, NULL) != NULL) {
+	gdm_system_locale = g_strdup (setlocale (LC_CTYPE, NULL));
+    }
+
     /* initial TERM/INT handler */
     sig.sa_handler = initial_term_int;
     sig.sa_flags = SA_RESTART;
--- gdm-2.6.0.3/daemon/slave.c	2005-03-10 16:34:02.000000000 -0800
+++ gdm-2.6.0.3-patch/daemon/slave.c	2005-03-10 16:57:58.936564792 -0800
@@ -156,6 +156,9 @@
 /* wait for a GO in the SOP protocol */
 extern gboolean gdm_wait_for_go;
 
+/* CR Id: 5032088 */
+extern char *gdm_system_locale;
+
 /* Local prototypes */
 static gint     gdm_slave_xerror_handler (Display *disp, XErrorEvent *evt);
 static gint     gdm_slave_xioerror_handler (Display *disp);
@@ -4292,7 +4295,11 @@
 #endif
 			   session,
 			   save_session,
-			   language,
+
+			   ((gdm_system_locale != (char *) NULL) &&
+			   ( (language == NULL) ||
+			   ((language != NULL) && (strcmp (language, "") == 0))) == TRUE ?
+			   gdm_system_locale : language),
 			   gnome_session,
 			   usrcfgok,
 			   savesess,
