This project demonstrates how to set up gettext localization and integrate it into discord.py v2.0.
Check out the onboarding if you want to learn how gettext and the package works. If you just want to test out the package, then:
-
Install this repository
python -m pip install git+https://github.com/thegamecracks/discord.py-i18n-demo
-
Create a config.toml file with your bot token
[bot] token = "Bot token from https://discord.com/developers/applications"
-
Start the bot
python -m dpygt
-
Use the "<@mention> sync" text command to register application commands
- Python 3.11 or greater
gettext
and its associated utilities, particularlymsgfmt
- Not sure how to get this? See the onboarding