mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
moved current language from RouterContext to ClientContext
This commit is contained in:
@@ -240,7 +240,7 @@ namespace http {
|
||||
std::string webroot; i2p::config::GetOption("http.webroot", webroot);
|
||||
|
||||
// Page language
|
||||
std::string currLang = i2p::context.GetLanguage ()->GetLanguage(); // get current used language
|
||||
std::string currLang = i2p::client::context.GetLanguage ()->GetLanguage(); // get current used language
|
||||
auto it = i2p::i18n::languages.find(currLang);
|
||||
std::string langCode = it->second.ShortCode;
|
||||
|
||||
@@ -766,7 +766,7 @@ namespace http {
|
||||
s << " <button type=\"submit\">" << tr("Change") << "</button>\r\n";
|
||||
s << "</form>\r\n<br>\r\n";
|
||||
|
||||
std::string currLang = i2p::context.GetLanguage ()->GetLanguage(); // get current used language
|
||||
std::string currLang = i2p::client::context.GetLanguage ()->GetLanguage(); // get current used language
|
||||
s << "<b>" << tr("Change language") << "</b><br>\r\n";
|
||||
s << "<form method=\"get\" action=\"" << webroot << "\">\r\n";
|
||||
s << " <input type=\"hidden\" name=\"cmd\" value=\"" << HTTP_COMMAND_SETLANGUAGE << "\">\r\n";
|
||||
@@ -1382,7 +1382,7 @@ namespace http {
|
||||
else if (cmd == HTTP_COMMAND_SETLANGUAGE)
|
||||
{
|
||||
std::string lang = params["lang"];
|
||||
std::string currLang = i2p::context.GetLanguage ()->GetLanguage();
|
||||
std::string currLang = i2p::client::context.GetLanguage ()->GetLanguage();
|
||||
|
||||
if (currLang.compare(lang) != 0)
|
||||
i2p::i18n::SetLanguage(lang);
|
||||
|
||||
Reference in New Issue
Block a user