Slash command localization
It would be fantastic if we could localize application commands (name and option names and descriptions).
Not everyone speaks English and as someone who speaks several languages, it's quite frustrating that I don't have an efficient way to make my bot available in all of them.
Here's an example of how it could work:
When creating an application command, in addition to the current fields, there could be a 'locales' field, which would be an object with a 'default' field indicating the default language (in IETF format), and another fields for each other supported language, using their IETF representation as the keys. There fields would mimick the command fields to provide the localized strings. 'options' would be an object with each option's name as keys and the localized name and description as the values.
For example:
{
"name": "send-message",
"description": "Messages someone",
"options": [{
"type": "USER", "name": "recipient", "required": true,
"description": "The person to message"
}, {
"type": "STRING", "name": "text", "required": true,
"description": "The text to send"
}],
"locales": {
"default": "en",
"fr-FR": {
"name": "envoie-message",
"description": "Envoie un message à quelqu'un",
"options": {
"recipient": {"name": "destinataire", "description": "La personne à qui envoyer le message"},
"text": {"name": "texte", "Le texte à envoyer"}
}
}
}
}
On the server side, an admin could right-click on a bot, and hover a "Language" dropdown menu to choose which language to use amongst the ones the bot offers.
The interactionCreate event would provide the server's preferred language so the bot can also localize the reply.
-
They've already discussed this in the last two dev stage faq events and have also said something about it before then
https://github.com/discord/discord-api-docs/issues/2313#issuecomment-761126291
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar