2007-11-16 Doug Turner <dougt@meer.net>
[WebKit-https.git] / WebCore / platform / gtk / Language.cpp
index 7886d60593fd78ae0887778c8b6e0dab094fe1a2..b835cb618b6fd23e4409147d9691308353f8ed3e 100644 (file)
 #include "CString.h"
 #include "PlatformString.h"
 
+#include <gtk/gtk.h>
 #include <pango/pango.h>
 
 namespace WebCore {
 
 String defaultLanguage()
 {
-    static String defaultLanguage;
-
-    if (!defaultLanguage.isEmpty())
-        return defaultLanguage;
-
-    PangoLanguage* pangoLanguage = pango_language_get_default();
-    defaultLanguage = String(pango_language_to_string(pangoLanguage));
-
-    return defaultLanguage;
+    return pango_language_to_string(gtk_get_default_language());
 }
 
 }