diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-10-03 19:04:06 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-10-03 19:04:06 +0200 |
commit | f8594405df1225a0a90820e701760042c09cf91b (patch) | |
tree | 67303b7f541307ab68265e98f84401329d22f14f /src | |
parent | Fix UAs description (diff) | |
download | rekonq-f8594405df1225a0a90820e701760042c09cf91b.tar.xz |
use language, NOT country!!!
This should fix bad language detection. Please, let me know about
CCBUG: 270023
Diffstat (limited to 'src')
-rw-r--r-- | src/networkaccessmanager.cpp | 11 |
1 files 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(); } |