About localizable interactions #3853
Replies: 5 comments 8 replies
-
for context, the Q&A transcript can be found here |
Beta Was this translation helpful? Give feedback.
-
There's some other stuff I think also needs addressing, for example discord does not do any unicode normalization across the api (from what I can tell). How will this work with types like choices etc? |
Beta Was this translation helpful? Give feedback.
-
I have more complete thoughts on this elsewhere, but I dislike the idea of using the user's in-Discord locale for this. I use Unfortunately the solution I mention, contacting the bot itself, introduces (possibly way too much) latency between when the user types I was brainstorming the parsing side of things for a while, and I was wondering if GrammaticalFramework could be leveraged in some way (it's literally built for this). Although I doubt Discord wants to force users to learn a parsing language for users who just want to keep things in en-US. |
Beta Was this translation helpful? Give feedback.
-
Discord has an option for guild owners to provide a language. Until now it has been reserved for discovery usage, this should just be simply allowed for all servers to set and provided to bots as well on the interactions that are sent. Global commands can have a separate solution whatever that may be like what was suggested above with registering a command with all translations as well. |
Beta Was this translation helpful? Give feedback.
-
Here's my take on "interaction internationalization/localization". There's a few things to consider here: localization of interations when they displayed in the client; bots being able to localize interaction responses as appropriate; and users being able to type in whatever language they want. First I think I'd like to make an initial suggestion about how users should communicate what locale they wish to interact in with the bot. I've seen a lot of comments here and on discord about how exposing the user's language setting would have issues with privacy and I'd like to also add that it is very inflexible. Bots have different use cases and users wanting to use different languages for different bots should be a given in my opinion. If users could set a preferred language for integrations as a guild setting (as an option in the server context menu next to change nick name) then it would allow for some flexibility. If this value defaulted to the guild's language -- currently only used for discovery -- then it would also prevent the user's personal info being shared to bots. You could also extrapolate this for specific integrations, but I could see discord not wanting to store information per user per integration per guild. Given this prefered language, discord could then localize command data when displayed to the user in the chat input. I think localizing components would be nice, but I can see discord wanting bots to do this since they are attached to messages. The user's prefered language could then be passed in interaction create payloads allowing bots to perform localization on their responses and send it back to the user prepared. This would address the first two issues I mentioned at the top. What I described above is a nice idea, but if users cannot properly use the command UI then it's ultimately a wasted effort. Recently discord announced that they are upgrading the chat input editor and command input UI within it, however because discord never does normalization enumerated types like string choices can be brittle and clunky in some languages: even if you can type them correctly there's no guarantee the api will interpret it correctly. If discord did let us provide translations of commands or provide some other i18n format then we would still have these kinds of problems. I think the biggest issue is that a lot of this is a regression compared to older message commands which bots managed themselves. A bot could accept a language setting from the user and then localized command discovery and execution could be done by the bot. I think a lot of people just want discord to let them handle this themselves providing translated command data to the api and dealing with it all manually but I think even in that scenario discord still needs to ensure it doesn't clash with the new UI for commands. |
Beta Was this translation helpful? Give feedback.
-
I couldn't find the Q&A that mentioned some answers about this but I would like to discuss what solutions are being thought about currently.
Context
Now that message-based commands are going to be kind of killed (mentions still work) and developers are kind of being forced to migrate to slash commands (which I'm not against), there needs to be a viable solution before it becomes something that developers need to take care of themselves with the current API.
Requirements (IMO)
Beta Was this translation helpful? Give feedback.
All reactions