Uses Vercel Edge Functions and Google Translate internal API, used in vitalets/google-translate-api. packages/shared is a place for shared utils between the extension and the website (although so far not really).Ideally, popup could live in the shared folder, using dependency injection for browser/WebExtension API, but the world isn't ideal, and so isn't the extension. The website renders the extension using env variable teling the source code if the bundler is for the browser environment ( Next.js) or extension, hence avoid using Web Extension API. packages/It's prety static and could use Remix (is it still a thing?), but it's already fast enough and Vercel integration is just great.It is installed as a Web Component to not leak the styles. packages/extension/src/content is the content script that is using some of the popup visuals, state and React context to show the translation on page in a dialog window.packages/extension/src/background is the "BE" logic that makes API requests for translations and adds successfully translated text to the sync storage (aka Memory).packages/extension/src/popup is the central UI, holding all the visuals.Turn translation in Microsoft Edge on or offīy default, Microsoft Edge will automatically prompt page translations.Īt the top corner of the browser, select Settings and more > Settings.Įnable or turn off Offer to translate pages that aren't in a language I read.īy default, Microsoft Edge uses the same language as your system. For more information about using different languages in Microsoft Edge, learn how to use Microsoft Edge in another language.See the rest of the commands inside respective folders in `packages/*/package.json#scripts Parts On the address bar, select the translate icon. Revert translated webpage back to original language In the Translate to menu, select which language you want to translate to. Select the translate icon in the address bar. To translate the page into a different language: However, you'll still be able to translate it manually at any time. If you've set Microsoft Edge to never translate a specific language, you won't see an automatic pop-up prompting you to translate. If you select the translate icon in the address bar, the menu that appears also shows the status. Inside the address bar, you'll briefly see the status showing that the page has been translated. Note: You can manually return to this panel later, even if you select the option to Never translate. To skip translation, in the list on the lower right, select Not now to skip translation or Never translate to never have the panel appear when you go to a page using that language. To always automatically translate from the source language, select the Always translate from check box. The default is the language you've set for Microsoft Edge. Depending on the number of pages you're uploading, this may. Click Translate to begin translating your document. You'll need to select the document you want to translate, then click Open. In the Translate to dropdown, choose the language you want the page translated into. Click the Documents tab in the top header, then click Browse your computer. The browser will detect the language of the page and a menu will appear asking you to confirm that you want to translate the page. To add or remove languages from the list, in Microsoft Edge, go to Settings and more > Settings > Languages. A language is considered foreign to you if it's not included in your Preferred languages list in Settings. The Translate icon appears in the address bar when you go to a web page that’s written in a foreign language. If you open a page written in a different language than your preferred languages in settings, Microsoft Edge will automatically prompt you to translate it.
0 Comments
Leave a Reply. |