mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
[i18n] add language changing at runtime in webconsole
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
6d2c9e367b
commit
12d6f03dc9
9 changed files with 396 additions and 354 deletions
|
@ -18,8 +18,11 @@ namespace i2p
|
|||
{
|
||||
namespace i18n
|
||||
{
|
||||
namespace afrikaans // language
|
||||
namespace afrikaans // language namespace
|
||||
{
|
||||
// language name in lowercase
|
||||
static std::string language = "afrikaans";
|
||||
|
||||
// See for language plural forms here:
|
||||
// https://localization-guide.readthedocs.io/en/latest/l10n/pluralforms.html
|
||||
static int plural (int n) {
|
||||
|
@ -65,7 +68,7 @@ namespace afrikaans // language
|
|||
|
||||
std::shared_ptr<const i2p::i18n::Locale> GetLocale()
|
||||
{
|
||||
return std::make_shared<i2p::i18n::Locale>(strings, plurals, [] (int n)->int { return plural(n); });
|
||||
return std::make_shared<i2p::i18n::Locale>(language, strings, plurals, [] (int n)->int { return plural(n); });
|
||||
}
|
||||
|
||||
} // language
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue