Fixed 3717982. Implemented navigator.language!
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jul 2004 23:33:10 +0000 (23:33 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jul 2004 23:33:10 +0000 (23:33 +0000)
        Reviewed by John.

        * khtml/ecma/kjs_navigator.cpp:
        (Navigator::getValueProperty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7011 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/ecma/kjs_navigator.cpp

index b3fa2d0..86920d4 100644 (file)
@@ -1,3 +1,12 @@
+2004-07-12  Richard Williamson   <rjw@apple.com>
+
+       Fixed 3717982.  Implemented navigator.language!
+
+        Reviewed by John.
+
+        * khtml/ecma/kjs_navigator.cpp:
+        (Navigator::getValueProperty):
+
 2004-07-12  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Hyatt
index 1fc7117..4f6c9f4 100644 (file)
@@ -212,8 +212,14 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
     return String("KDE");
 #endif
   case Language:
+#if APPLE_CHANGES
+    // We don't have an implementation of KGlobal::locale().  We do however
+    // have a static method on KLocale to access the current language.
+    return String(KLocale::language());
+#else
     return String(KGlobal::locale()->language() == "C" ?
                   QString::fromLatin1("en") : KGlobal::locale()->language());
+#endif
   case UserAgent:
     return String(userAgent);
   case Platform: