Fixed: Bug with language in URLs

--HG--
branch : compatibility-develop
hg/compatibility-develop
kervala 9 years ago
parent a1c89b0d7b
commit 28bbf76c8f

@ -1916,12 +1916,15 @@ class CAHOpenURL : public IActionHandler
string::size_type pos_lang = url.find("/en/");
// or new forums
if (pos_lang != string::npos)
if (pos_lang == string::npos)
pos_lang = url.find("=en#");
if (pos_lang == string::npos)
if (pos_lang != string::npos)
{
url.replace(pos_lang + 1, 2, ClientCfg.getHtmlLanguageCode());
}
else
{
// append language
if (url.find('?') != string::npos)
url += "&";
@ -1929,6 +1932,7 @@ class CAHOpenURL : public IActionHandler
url += "?";
url += "language=" + ClientCfg.LanguageCode;
}
openURL(url.c_str());

Loading…
Cancel
Save