2021-05-23 03:06:04 +00:00
|
|
|
|
/*
|
2022-01-09 20:42:13 +00:00
|
|
|
|
* Copyright (c) 2021-2022, The PurpleI2P Project
|
2021-05-23 03:06:04 +00:00
|
|
|
|
*
|
|
|
|
|
* This file is part of Purple i2pd project and licensed under BSD3
|
|
|
|
|
*
|
|
|
|
|
* See full license text in LICENSE file at top of project tree
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __I18N_LANGS_H__
|
|
|
|
|
#define __I18N_LANGS_H__
|
|
|
|
|
|
2022-11-25 00:26:38 +00:00
|
|
|
|
#include "I18N.h"
|
|
|
|
|
|
2021-05-25 19:03:29 +00:00
|
|
|
|
namespace i2p
|
|
|
|
|
{
|
|
|
|
|
namespace i18n
|
|
|
|
|
{
|
2021-06-27 14:14:45 +00:00
|
|
|
|
struct langData
|
|
|
|
|
{
|
2021-08-06 17:42:08 +00:00
|
|
|
|
std::string LocaleName; // localized name
|
|
|
|
|
std::string ShortCode; // short language code, like "en"
|
2021-06-27 14:14:45 +00:00
|
|
|
|
std::function<std::shared_ptr<const i2p::i18n::Locale> (void)> LocaleFunc;
|
|
|
|
|
};
|
|
|
|
|
|
2021-05-25 19:03:29 +00:00
|
|
|
|
// Add localization here with language name as namespace
|
2021-06-16 14:57:02 +00:00
|
|
|
|
namespace afrikaans { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2021-11-18 12:15:34 +00:00
|
|
|
|
namespace armenian { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2022-08-03 08:48:10 +00:00
|
|
|
|
namespace chinese { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2022-12-18 21:56:41 +00:00
|
|
|
|
namespace czech { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2021-06-16 14:57:02 +00:00
|
|
|
|
namespace english { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2022-05-15 08:45:57 +00:00
|
|
|
|
namespace french { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2022-01-09 20:42:13 +00:00
|
|
|
|
namespace german { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2022-08-30 20:59:26 +00:00
|
|
|
|
namespace italian { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2021-06-16 14:57:02 +00:00
|
|
|
|
namespace russian { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2022-09-04 19:24:56 +00:00
|
|
|
|
namespace spanish { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2023-01-19 02:53:29 +00:00
|
|
|
|
namespace swedish { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2021-06-16 14:57:02 +00:00
|
|
|
|
namespace turkmen { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2021-05-26 07:50:02 +00:00
|
|
|
|
namespace ukrainian { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2021-08-18 20:04:52 +00:00
|
|
|
|
namespace uzbek { std::shared_ptr<const i2p::i18n::Locale> GetLocale (); }
|
2021-05-23 03:06:04 +00:00
|
|
|
|
|
2021-06-27 14:14:45 +00:00
|
|
|
|
/**
|
2022-01-09 20:42:13 +00:00
|
|
|
|
* That map contains international language name lower-case, name in it's language and it's code
|
2021-06-27 14:14:45 +00:00
|
|
|
|
*/
|
|
|
|
|
static std::map<std::string, langData> languages
|
|
|
|
|
{
|
2021-08-06 17:42:08 +00:00
|
|
|
|
{ "afrikaans", {"Afrikaans", "af", i2p::i18n::afrikaans::GetLocale} },
|
2022-09-04 19:24:56 +00:00
|
|
|
|
{ "armenian", {"hայերէն", "hy", i2p::i18n::armenian::GetLocale} },
|
2022-08-03 08:48:10 +00:00
|
|
|
|
{ "chinese", {"简体字", "zh-CN", i2p::i18n::chinese::GetLocale} },
|
2022-12-18 22:00:50 +00:00
|
|
|
|
{ "czech", {"čeština", "cs", i2p::i18n::czech::GetLocale} },
|
2021-08-06 17:42:08 +00:00
|
|
|
|
{ "english", {"English", "en", i2p::i18n::english::GetLocale} },
|
2022-05-15 08:45:57 +00:00
|
|
|
|
{ "french", {"Français", "fr", i2p::i18n::french::GetLocale} },
|
2022-01-09 20:42:13 +00:00
|
|
|
|
{ "german", {"Deutsch", "de", i2p::i18n::german::GetLocale} },
|
2022-08-30 20:59:26 +00:00
|
|
|
|
{ "italian", {"Italiano", "it", i2p::i18n::italian::GetLocale} },
|
2022-09-04 19:24:56 +00:00
|
|
|
|
{ "russian", {"Русский язык", "ru", i2p::i18n::russian::GetLocale} },
|
|
|
|
|
{ "spanish", {"Español", "es", i2p::i18n::spanish::GetLocale} },
|
2023-01-19 02:53:29 +00:00
|
|
|
|
{ "swedish", {"Svenska", "sv", i2p::i18n::swedish::GetLocale} },
|
2022-09-04 19:24:56 +00:00
|
|
|
|
{ "turkmen", {"Türkmen dili", "tk", i2p::i18n::turkmen::GetLocale} },
|
|
|
|
|
{ "ukrainian", {"Украї́нська мо́ва", "uk", i2p::i18n::ukrainian::GetLocale} },
|
2021-08-18 19:55:14 +00:00
|
|
|
|
{ "uzbek", {"Oʻzbek", "uz", i2p::i18n::uzbek::GetLocale} },
|
2021-06-27 14:14:45 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-05-23 03:06:04 +00:00
|
|
|
|
} // i18n
|
|
|
|
|
} // i2p
|
|
|
|
|
|
|
|
|
|
#endif // __I18N_LANGS_H__
|