![]() 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.This is particularly useful if you want to translate entire websites.See the rest of the commands inside respective folders in `packages/*/package.json#scripts Parts Once you are viewing the page in the translated language any links you click on within the page will be automatically translated for you. Now choose the language you wish to translate it into. ![]() If you aren’t sure you could choose Detect Language. Paste the URL of the website you wish to translate into the first box and choose the language it is written in.If you would rather not use Chrome, you can just use the Google Translate webpage to translate entire webpages. You will see two language options: your own language and the one the page is written in.In the address bar you will see a Google Translate icon.You can also translate webpages using Chrome on the Mac. Sometimes we found that the translation option wasn’t immediately visible, this may be due to a delay while the translation takes place or it may just need to be triggered by scrolling around on the page a bit. If you want to see the original then just tap on the other language shown. The page will translate into your language.Tap on English (assuming that’s your default language).At the bottom of the screen you will see an invitation to translate the page into a language – it will show you the language the page is written in and your default language.The toolbar displays with a default of Translate to English and you can Turn off Detect Language translation if desired. Clicking on the bookmarklet will open the Google Translation Bar. Google Chrome app for iOS here (it’s free) To add it to your favorite browser simply drag the bookmarklet to your browser’s Bookmarks Toolbar. ![]() These include using the Microsoft Translator app, Google Chrome on iPhone, iPad and Mac, or using the Google Translate website. Right now there are a few options if you want to translate webpages on the iPhone, iPad or Mac. However, we expect that it will be performed in a similar fashion to the iPhone and iPad. How Safari Translations will work in macOS Big SurĪpple hasn’t revealed exactly how the Translation feature will work in Safari on the Mac as yet.
0 Comments
Leave a Reply. |