Index: gdm-2.24.0/daemon/gdm-session-direct.c
===================================================================
--- gdm-2.24.0.orig/daemon/gdm-session-direct.c
+++ gdm-2.24.0/daemon/gdm-session-direct.c
@@ -586,14 +586,45 @@ get_session_command_for_name (const char
         return res;
 }
 
-static const char *
+static gchar *
+ensure_non_empty (gchar *str)
+{
+        if (str && *str == '\0') {
+                g_free (str);
+                str = NULL;
+        }
+
+        return str;
+}
+
+static char *
+_get_default_language_name_from_sysconfig (void)
+{
+        gchar *language;
+
+        language = ensure_non_empty (gdm_sysconfig_load_value ("/etc/sysconfig/language", "RC_LC_ALL"));
+        if (!language)
+                language = ensure_non_empty (gdm_sysconfig_load_value ("/etc/sysconfig/language", "RC_LC_MESSAGES"));
+        if (!language)
+                language = ensure_non_empty (gdm_sysconfig_load_value ("/etc/sysconfig/language", "RC_LANG"));
+
+        return language;
+}
+
+static char *
 get_default_language_name (GdmSessionDirect *session)
 {
+    gchar *language;
+
     if (session->priv->saved_language != NULL) {
-                return session->priv->saved_language;
+                return g_strdup (session->priv->saved_language);
     }
 
-    return setlocale (LC_MESSAGES, NULL);
+    language = _get_default_language_name_from_sysconfig ();
+    if (!language)
+        language = g_strdup (setlocale (LC_MESSAGES, NULL));
+
+    return language;
 }
 
 static char *
@@ -746,15 +777,18 @@ static void
 gdm_session_direct_defaults_changed (GdmSessionDirect *session)
 {
         GdmSessionDirect *impl = GDM_SESSION_DIRECT (session);
+        gchar *language = get_default_language_name (session);
 
         _gdm_session_default_language_name_changed (GDM_SESSION (session),
-                                                    get_default_language_name (session));
+                                                    language);
         _gdm_session_default_layout_name_changed (GDM_SESSION (session),
                                                   get_default_layout_name (session));
         _gdm_session_default_session_name_changed (GDM_SESSION (session),
                                                    get_default_session_name (session));
         send_dbus_string_signal (impl, "SetDefaultSessionName",
                                  get_session_name (impl));
+
+        g_free (language);
 }
 
 static void
@@ -1103,6 +1137,7 @@ gdm_session_direct_handle_saved_language
         DBusMessage *reply;
         DBusError    error;
         const char  *language_name;
+        gchar       *default_language_name;
 
         dbus_error_init (&error);
         if (! dbus_message_get_args (message, &error,
@@ -1115,8 +1150,10 @@ gdm_session_direct_handle_saved_language
         dbus_connection_send (connection, reply, NULL);
         dbus_message_unref (reply);
 
+        default_language_name = get_default_language_name (session);
+
         if (strcmp (language_name,
-                    get_default_language_name (session)) != 0) {
+                    default_language_name) != 0) {
                 g_free (session->priv->saved_language);
                 session->priv->saved_language = g_strdup (language_name);
 
@@ -1124,6 +1161,7 @@ gdm_session_direct_handle_saved_language
                                                             language_name);
         }
 
+        g_free (default_language_name);
 
         return DBUS_HANDLER_RESULT_HANDLED;
 }
@@ -1962,11 +2000,11 @@ send_environment (GdmSessionDirect *sess
                               session);
 }
 
-static const char *
+static char *
 get_language_name (GdmSessionDirect *session)
 {
         if (session->priv->selected_language != NULL) {
-                return session->priv->selected_language;
+                return g_strdup (session->priv->selected_language);
         }
 
         return get_default_language_name (session);
@@ -2033,6 +2071,8 @@ gdm_session_direct_set_environment_varia
 static void
 setup_session_environment (GdmSessionDirect *session)
 {
+        gchar *language = get_language_name (session);
+
         gdm_session_direct_set_environment_variable (session,
                                                      "GDMSESSION",
                                                      get_session_name (session));
@@ -2042,10 +2082,10 @@ setup_session_environment (GdmSessionDir
 
         gdm_session_direct_set_environment_variable (session,
                                                      "LANG",
-                                                     get_language_name (session));
+                                                     language);
         gdm_session_direct_set_environment_variable (session,
                                                      "GDM_LANG",
-                                                     get_language_name (session));
+                                                     language);
 
         gdm_session_direct_set_environment_variable (session,
                                                      "GDM_KEYBOARD_LAYOUT",
@@ -2076,6 +2116,7 @@ setup_session_environment (GdmSessionDir
                                                      GDM_SESSION_DEFAULT_PATH :
                                                      BINDIR ":" GDM_SESSION_DEFAULT_PATH);
 
+        g_free (language);
 }
 
 static void
@@ -2203,6 +2244,7 @@ gdm_session_direct_select_language (GdmS
                                     const char *text)
 {
         GdmSessionDirect *impl = GDM_SESSION_DIRECT (session);
+        gchar *language;
 
         g_free (impl->priv->selected_language);
 
@@ -2212,8 +2254,10 @@ gdm_session_direct_select_language (GdmS
                 impl->priv->selected_language = g_strdup (text);
         }
 
+        language = get_language_name (impl);
         send_dbus_string_signal (impl, "SetLanguageName",
-                                 get_language_name (impl));
+                                 language);
+        g_free (language);
 }
 
 static void
Index: gdm-2.24.0/daemon/gdm-session-worker-job.c
===================================================================
--- gdm-2.24.0.orig/daemon/gdm-session-worker-job.c
+++ gdm-2.24.0/daemon/gdm-session-worker-job.c
@@ -41,6 +41,7 @@
 #include <dbus/dbus-glib-lowlevel.h>
 
 #include "gdm-common.h"
+#include "gdm-sysconfig.h"
 
 #include "gdm-session-worker-job.h"
 
@@ -149,6 +150,40 @@ copy_environment_to_hash (GHashTable *ha
         g_strfreev (env_strv);
 }
 
+static void
+update_locale_from_sysconfig (GHashTable *hash)
+{
+        static const char * const locale_env_keys [] = {
+                "LANG", "LANGUAGE", "LC_CTYPE", "LC_NUMERIC", "LC_TIME",
+                "LC_COLLATE", "LC_MONETARY", "LC_MESSAGES", "LC_PAPER",
+                "LC_NAME", "LC_ADDRESS", "LC_TELEPHONE", "LC_MEASUREMENT",
+                "LC_IDENTIFICATION", "LC_ALL",
+                NULL
+        };
+        int i;
+
+        for (i = 0; locale_env_keys [i] != NULL; i++) {
+                const gchar *key = locale_env_keys [i];
+                gchar *value;
+                gchar *system_default_key;
+
+                system_default_key = g_strconcat ("RC_", key, NULL);
+                value = gdm_sysconfig_load_value ("/etc/sysconfig/language", system_default_key);
+                g_free (system_default_key);
+
+                /* An empty value is as good as no key at all */
+                if (value && !value [0]) {
+                        g_free (value);
+                        value = NULL;
+                }
+
+                if (value)
+                        g_hash_table_insert (hash,
+                                             g_strdup (key),
+                                             value);
+        }
+}
+
 static GPtrArray *
 get_job_environment (GdmSessionWorkerJob *job)
 {
@@ -161,6 +196,10 @@ get_job_environment (GdmSessionWorkerJob
         hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
         copy_environment_to_hash (hash);
 
+        /* In case the system language changed since GDM started, update the relevant env
+         * vars so PAM messages will appear in the correct language. */
+        update_locale_from_sysconfig (hash);
+
         g_hash_table_insert (hash, g_strdup ("GDM_SESSION_DBUS_ADDRESS"), g_strdup (job->priv->server_address));
 
         g_hash_table_foreach (hash, (GHFunc)listify_hash, env);
Index: gdm-2.24.0/daemon/gdm-welcome-session.c
===================================================================
--- gdm-2.24.0.orig/daemon/gdm-welcome-session.c
+++ gdm-2.24.0/daemon/gdm-welcome-session.c
@@ -42,6 +42,7 @@
 #include <dbus/dbus-glib-lowlevel.h>
 
 #include "gdm-common.h"
+#include "gdm-sysconfig.h"
 #include "ck-connector.h"
 
 #include "gdm-welcome-session.h"
@@ -257,13 +258,33 @@ get_welcome_environment (GdmWelcomeSessi
         hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
 
         for (i = 0; optional_environment[i] != NULL; i++) {
-                if (g_getenv (optional_environment[i]) == NULL) {
-                        continue;
+                const gchar *key = optional_environment [i];
+                gchar *value;
+                gchar *system_default_key;
+
+                /* Prefer system defaults from /etc/sysconfig/language, so we get updated language
+                 * in greeters without having to restart gdm. */
+
+                system_default_key = g_strconcat ("RC_", key, NULL);
+                value = gdm_sysconfig_load_value ("/etc/sysconfig/language", system_default_key);
+                g_free (system_default_key);
+
+                /* An empty value is as good as no key at all */
+                if (value && !value [0]) {
+                        g_free (value);
+                        value = NULL;
                 }
 
-                g_hash_table_insert (hash,
-                                     g_strdup (optional_environment[i]),
-                                     g_strdup (g_getenv (optional_environment[i])));
+                if (!value) {
+                        const gchar *env_value = g_getenv (key);
+                        if (env_value)
+                                value = g_strdup (env_value);
+                }
+
+                if (value)
+                        g_hash_table_insert (hash,
+                                             g_strdup (key),
+                                             value);
         }
 
         if (welcome_session->priv->dbus_bus_address != NULL) {
