diff --git a/panels/common/cc-common-language.c b/panels/common/cc-common-language.c index b97c557f4..fa59b91fd 100644 --- a/panels/common/cc-common-language.c +++ b/panels/common/cc-common-language.c @@ -34,6 +34,8 @@ #include "gdm-languages.h" +static char *get_lang_for_user_object_path (const char *path); + static gint cc_common_language_sort_languages (GtkTreeModel *model, GtkTreeIter *a, @@ -315,8 +317,15 @@ gchar * cc_common_language_get_current_language (void) { gchar *language; + char *path; const gchar *locale; + path = g_strdup_printf ("/org/freedesktop/Accounts/User%d", getuid ()); + language = get_lang_for_user_object_path (path); + g_free (path); + if (language != NULL && *language != '\0') + return language; + locale = (const gchar *) setlocale (LC_MESSAGES, NULL); if (locale) language = gdm_normalize_language_name (locale);