[i18n] translate HTTP proxy

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2021-05-23 06:06:04 +03:00
parent 80b44fc9a9
commit df66c2d2dc
No known key found for this signature in database
GPG key ID: 66F6C87B98EBCFE2
6 changed files with 120 additions and 56 deletions

View file

@ -11,20 +11,11 @@
#include "RouterContext.h"
namespace i2p {
namespace i18n {
namespace english {
std::string GetString (std::string arg);
std::string GetPlural (std::string arg, int n);
}
namespace russian {
std::string GetString (std::string arg);
std::string GetPlural (std::string arg, int n);
}
std::string translate (std::string arg)
inline std::string translate (std::string arg)
{
switch (i2p::context.GetLanguage ())
{
@ -49,7 +40,8 @@ namespace i18n {
} // i2p
template<typename... TArgs>
std::string tr (TArgs&&... args) {
std::string tr (TArgs&&... args)
{
return i2p::i18n::translate(std::forward<TArgs>(args)...);
}