These are the libraries that we're using in this project:
- Dpp - version
10.0.24
(latest) - Spdlog - version
1.11.0
(latest) - Base64 (extracted)
- Sqlite3 - version
3.42.0
(latest)
- Microsoft Windows 10
x64/x86
- Visual Studio platform
x64/x86
- C++ 17
ISO/IEC 14882
We need your help! We are currently using Google Translate to translate our language data. If you found that the our translation is incorrect, compare with the original en-us.json
, please help us to fix by creating a pull request.
Also, if you want to add more language, please copy exactly what we wrote in en-us.json
, and translate. You can see our demonstration below:
"LANGUAGE":
{
"title": "please_translate_here",
"description": "please_translate_here"
},
please_translate_here
is the place where you can translate.
If you want to add more languages, we would glad to see your translation. For adding new language, please follow these steps below:
a. Open language.cpp and copy and paste like this:
else if (language == "japanese")
{
if (check_user)
database.deleteRecord("configuration", "id=" + target_user);
change_language = "ja-jp";
database.insert("configuration", target_user + ", '" + change_language + "'");
}
// Copy from here ...
else if (language == "{change_here}")
{
if (check_user)
database.deleteRecord("configuration", "id=" + target_user);
change_language = "{change_here}";
database.insert("configuration", target_user + ", '" + change_language + "'");
}
// ... to here, and paste like a "chain" else-if statement
{change_here}
variable is the variable you should change when you added.
b. Create your .json
file in our language data
Please make sure to name the file like this:
{Language}-{regional}.json
For example: en-uk.json
: Language is English, regional is United Kingdom
c. Go to cores/cmd_layout.h and do like this:
inline std::map<std::string, Command> commands
{
// Common commands
{
"ping",
{
"Check bot latency", ping
}
},
{
"language",
{
"Configure bot language to show to you", language,
{
dpp::command_option(dpp::co_string, "option", "Your language option", true)
.add_choice(dpp::command_option_choice("English", std::string("english")))
// Copy this line below and change where you found {change_here} ...
.add_choice(dpp::command_option_choice("{change_here}", std::string("{change_here}")))
// ... end of your copy
}
}
},
};
{change_here}
is the variable you should change like what we did above.
Thank you so much for collaborating ^^
I'd probably be glad to see if you have anything new to help and support me. To do that, please make one and before you do that, just make sure you've tested the code. I won't bite you if you do it wrong, but just make sure that you have to test it clearly before I merge it.
Please follow our Code of Conduct!
Your star is our inspiration. Leave us a star ⭐️ can let us have more inspiration to make this project more better for everyone; Or, if you want to contact us faster, you can join our Discord server!
- This project license is based on both MIT and GPL-3.0 licenses.
- Dotenv is written by Harshfeudal and the license based on MIT license.