2021-05-25 19:03:29 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, The PurpleI2P Project
|
|
|
|
*
|
|
|
|
* This file is part of Purple i2pd project and licensed under BSD3
|
|
|
|
*
|
|
|
|
* See full license text in LICENSE file at top of project tree
|
|
|
|
*/
|
|
|
|
|
2021-05-22 15:29:05 +00:00
|
|
|
#include <map>
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
2021-05-25 19:03:29 +00:00
|
|
|
#include <memory>
|
|
|
|
#include "I18N.h"
|
2021-05-22 15:29:05 +00:00
|
|
|
|
2021-05-25 19:03:29 +00:00
|
|
|
// English localization file
|
2021-06-15 21:13:26 +00:00
|
|
|
// This is an example translation file without strings in it.
|
2021-05-22 15:29:05 +00:00
|
|
|
|
2021-05-25 19:03:29 +00:00
|
|
|
namespace i2p
|
|
|
|
{
|
|
|
|
namespace i18n
|
|
|
|
{
|
|
|
|
namespace english // language
|
|
|
|
{
|
2021-05-22 15:29:05 +00:00
|
|
|
// See for language plural forms here:
|
|
|
|
// https://localization-guide.readthedocs.io/en/latest/l10n/pluralforms.html
|
2021-05-25 19:03:29 +00:00
|
|
|
static int plural (int n) {
|
2021-05-22 15:29:05 +00:00
|
|
|
return n != 1 ? 1 : 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static std::map<std::string, std::string> strings
|
|
|
|
{
|
2021-05-25 19:03:29 +00:00
|
|
|
{"", ""},
|
2021-05-22 15:29:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static std::map<std::string, std::vector<std::string>> plurals
|
|
|
|
{
|
2021-05-25 19:03:29 +00:00
|
|
|
{"", {"", ""}},
|
2021-05-22 15:29:05 +00:00
|
|
|
};
|
|
|
|
|
2021-05-25 19:03:29 +00:00
|
|
|
std::shared_ptr<const i2p::i18n::Locale> GetLocale()
|
2021-05-22 15:29:05 +00:00
|
|
|
{
|
2021-05-25 19:03:29 +00:00
|
|
|
return std::make_shared<i2p::i18n::Locale>(strings, plurals, [] (int n)->int { return plural(n); });
|
2021-05-22 15:29:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // language
|
|
|
|
} // i18n
|
|
|
|
} // i2p
|