Discord Web / Chrome extension
I built an inline translation extension for Discord Web
Joining an international game community should not require keeping a translation website open beside every conversation. I wanted to read the discussion in context rather than copy a message, translate it, and search for my place again.
That was the reason for a Discord translation extension I previously introduced in Japanese. The extension is already published on the Chrome Web Store. It provides inline reading translation and a separate path for translating selected text while composing a reply.
View the Discord translation extension on the Chrome Web Store.
For the technical sections below, I have revisited the local v2.0.6 source. This local version is the basis for the implementation details, rather than a claim about the store's current package version.
This article explains what that code does and what needs a fresh browser check. I have not installed the revisited package or translated a live Discord conversation in this review, so it is not a current compatibility or performance benchmark.
Context matters as much as the translated sentence
A translated line is easier to understand when the original speaker and surrounding conversation remain visible. Switching to another tab often removes that context.
For an inline tool, I judge the interface by three questions:
- Can I still find the original wording?
- Can I tell which text came from a translation tool?
- Can I disable translation when it gets in the way?
Those questions matter for multilingual game communities, people learning Japanese, and participants who need help reading a language. They are proposed audiences for this project, not users whose outcomes I have measured.
Working with a changing page
The content script scans message-like DOM elements, then watches added nodes with a MutationObserver. An IntersectionObserver requests translations near the viewport; its root margin is 800 pixels, so that includes some content outside the visible screen. The background script queues translation jobs with a four-job concurrency limit and gives priority jobs precedence.
message element
-> viewport observation
-> chrome.runtime message
-> background queue
-> external translation request
-> inline translation element
This is a browser DOM integration. It is not a Discord bot, and it does not use a Discord bot token in the inspected translation flow. It depends on selectors matching Discord's browser interface. A selector that worked when this version was written may need attention when the page changes.
The code marks a node as processed before the translation request completes. That helps avoid repeated work, but it creates a failure-handling question: an unsuccessful request can leave a node marked without a useful translation. That is a source finding; I have not measured how often it happens in current Discord.
Reading and replying are different jobs
Reading translation helps someone follow an existing discussion. Translation while composing changes the words that other people will receive.
For the second job, a person needs time to inspect the transformed text before deciding to send it. Names, game terminology and tone can all matter.
The source opens a translation popup and offers a Replace action when it has an input selection. For Discord's contenteditable input, that action dispatches a plain-text paste event. It does not send a chat message in that handler. Whether Discord's current editor accepts the event still needs a real browser check.
The Free package sets DAILY_LIMIT to 8. In the content script, the limit check is used for the input-selection path, not the ordinary inline reading request. The counter increments before translation completes. Describing this as “eight translations per day” without explaining which operation is counted would be misleading.
The inspected Pro package changes the local limit to 999999. That is a client-side allowance, not evidence that an external provider has unlimited capacity or that a paid license has been verified. The manifest, content script and popup files match the Free package; the background file is the difference among the four core files compared.
A successful response can still be a failed translation
The translation helper processes text line by line. It skips blank lines and URL-only lines, and it removes some emoji before the external request.
If a line's request fails or the response lacks the expected translated string, the helper returns the original line. The surrounding message handler can then report success even though the text was not translated. An unchanged sentence therefore cannot prove that the translation service succeeded.
A production revision should represent that outcome explicitly. It should also put external translation strings into text nodes: the current popup interpolates the response into innerHTML. The practical next checks are a failed request, a changed message, a channel switch and the current input editor, using fictional messages.
Permissions belong in the explanation
The manifest declares storage, a host permission for https://translate.googleapis.com/*, and a content-script match for https://discord.com/*. This confines the declared content-script scope to Discord's website; it is not proof that message processing is local.
The background implementation sends message text to Google's translate_a/single endpoint with client=gtx. It is different from the authenticated Cloud Translation Basic API documented by Google. A working request to that endpoint would not establish a supported commercial API arrangement. This is an independent project, not an official Discord or Google extension. I have not made translation requests in this review.
The code uses chrome.storage.sync for settings such as the target and interface languages, and local storage for the daily counter and date. Chrome sync is a different storage model from a strict “device only” claim. The older privacy document also leaves its contact field unfinished. Before a fresh release, its wording needs to match the implementation and the actual translation service used.
A smaller starting point for a product
The starting value of this project is specific: help a person stay with a multilingual conversation. A useful next example is one language pair in a current Discord browser session, with the original message, the translation, a visible failure and the review-before-send step.
The published Chrome Web Store listing provides the extension's installation destination. The original Japanese project article contains the earlier introduction and interface examples. This English revision adds findings from the local source instead of treating those older screenshots as current compatibility evidence.
If you take part in a multilingual Discord community, which is harder for you: following fast conversations or checking the wording of your own reply?
AI disclosure: An AI agent prepared and revised this English article from the owner's Japanese project article and local extension source. Publication status was confirmed by the project owner. The article does not report new user results or measured time savings.