mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
[i18n] translate HTTP proxy
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
80b44fc9a9
commit
df66c2d2dc
6 changed files with 120 additions and 56 deletions
16
i18n/I18N.h
16
i18n/I18N.h
|
@ -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)...);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue