From f8594405df1225a0a90820e701760042c09cf91b Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 3 Oct 2011 19:04:06 +0200 Subject: use language, NOT country!!! This should fix bad language detection. Please, let me know about CCBUG: 270023 --- src/networkaccessmanager.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp index 21377dd9..1cfcce42 100644 --- a/src/networkaccessmanager.cpp +++ b/src/networkaccessmanager.cpp @@ -43,11 +43,14 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent) : AccessManager(parent) { - QString c = KGlobal::locale()->country(); + QString c = KGlobal::locale()->language(); + if (c == QL1S("C")) - c = QL1S("en_US"); - if (c != QL1S("en_US")) - c.append(QL1S(", en_US")); + c = QL1S("en-US"); + else + c = c.replace(QL1C('_') , QL1C('-')); + + c.append(QL1S(", en-US; q=0.8, en; q=0.6")); _acceptLanguage = c.toLatin1(); } -- cgit v1.2.1