Comment 3 for bug 740754

Gunnar Hjalmarsson (gunnarhj) wrote :

Tried the below code, but no success. Unlike the previous code, the screen didn't turn black. Progress?

static const char *
get_default_language_name (GdmSessionDirect *session)
{
    char *langlist;
    char language[50];

    if (session->priv->saved_language != NULL) {
                return session->priv->saved_language;
    }

    langlist = getenv("LANGUAGE");

    if (langlist != NULL && strlen(langlist) > 0) {
        strncpy( language, langlist, strcspn(langlist, ":") );
        return language;
    }

    return setlocale (LC_MESSAGES, NULL);
}