i18n for embeds #6295
Unanswered
RealAlphabet
asked this question in
API Feature Requests & Ideas
i18n for embeds
#6295
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
Today, bots receive the local language configured on the Discord client when the user uses a command slash or interacts with a button. This is great, but it's only useful for ephemeral messages.
Proposal
Having the ability to set message internationalization for non-ephemeral messages would be desirable in many use cases and especially for international servers. Added to the ability to internationalize roles and channnels it would be perfect.
Why this is needed
It's great to be able to respond in the user's language, but if users doesn't understand the main language in which the embed message is written, they're unlikely to interact with it.
How could this be implemented?
An idea could be to add new internationalization properties to embeds. Or better still, define several completely different embeds depending on the language (for images).
But I've got a much better idea, and this one will surprise you !
Whoever gets the reference, you're good
Here's how it works.
Set a new flag on embed messages to indicate whether or not the message is internationalized.
Now here's where it gets interesting. The Discord client will detect that the message has a translation and will display a button of its own, such as a
Translate message
tooltip or button.If the user clicks, Discord will send a new type of interaction to the bot, asking it to update the message for the user's locale.
To prevent developers from customizing the message for users, the Discord API will only send the bot the user's locale and no information on who requested the translation.
In this way, the Discord API can be free to cache the translation and automatically display it to other users.
Limitations
Advantages
Alternatives considered
Beta Was this translation helpful? Give feedback.
All reactions