[i18n] enable Ukrainian in source

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2021-05-26 10:50:02 +03:00
parent bdf63cf82c
commit cc1244126c
No known key found for this signature in database
GPG key ID: 66F6C87B98EBCFE2
3 changed files with 5 additions and 2 deletions

View file

@ -104,7 +104,7 @@ port = 7070
# user = i2pd
# pass = changeme
## Select webconsole language
## Currently supported only english (default) and russian languages
## Currently supported english (default), russian and ukrainian languages
# lang = english
[httpproxy]

View file

@ -19,7 +19,9 @@ namespace i18n
{
if (!lang.compare("russian"))
i2p::context.SetLanguage (i2p::i18n::russian::GetLocale());
else
if (!lang.compare("ukrainian"))
i2p::context.SetLanguage (i2p::i18n::ukrainian::GetLocale());
else // fallback
i2p::context.SetLanguage (i2p::i18n::english::GetLocale());
}

View file

@ -58,6 +58,7 @@ namespace i18n
// Add localization here with language name as namespace
namespace english { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
namespace russian { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
namespace ukrainian { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
} // i18n
} // i2p