#๐ I'm writing a bot in Python and I wanted it to be available in several languages
9 messages ยท Page 1 of 1 (latest)
@loud crater
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Do you mean you'd like the bot to be able to communicate to users in different languages?
Ok, so you'd either have to hard-code the localization strings or use some sort of translation service.
May be worth looking into https://docs.python.org/3/library/gettext.html#gnu-gettext-api
https://lokalise.com/blog/beginners-guide-to-python-i18n/ shows how to use placeholders to substitute things into the string
.
You can type !close on a blank line to close the channel if that's what you want.
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.