TranslateLocally for the Browser is a web-extension that enables client side in-page translations for web browsers. It is a stand-alone extension, but can integrate with TranslateLocally for custom models and even better performance.
TranslateLocally for the Browser is a fork of Firefox Translations. It was initially developed in the Bergamot project as a testing bed for the technology that went into Firefox Translations.
- Download the translatelocally.xpi file from the latest release.
- If you do this in Firefox, it will prompt you to install it
- Otherwise, open Firefox and drag & drop the downloaded file into it. It will then prompt you to install it.
- Runs entirely offline (it downloads the necessary language model on demand, but it will never submit any text or metadata to any server.)
- In-page translations, including support for web apps.
- Translates selection
- Translate as you type in form fields
- Can use TranslateLocally for even faster and more efficient translations. And you can import any translation model that is supported by Marian.
- Uses models from https://github.com/browsermt/students. Most of these are also available through Mozilla's extension.
- UI is a button + popup instead of the translation bar because the translation bar is not available for unprivileged extensions.
- Translation engine and memory is shared among all tabs and webpages
- Removed optional translation quality indicators
- UI is only in English (for now)
- Install Firefox (Nightly for better performance when using WASM)
- Clone this repo and run
npm install
- Run
npm run watch
and wait until Firefox starts - Browse to a page in any of the supported languages (https://github.com/browsermt/students) to have the translation option to appear
- Download the latest release from the TranslateLocally
- …and start it once. This will register the native client with Firefox.
- Go to about://addons, click "TranslateLocally for Firefox", and click "Preferences".
- You can then select TranslateLocally as your translation provider in the Preferences pane of the extension settings.
This branch has experimental support for Google Chrome, including native messaging. However, setup is a bit of a hassle at the moment:
- Clone or download this repository
- Open Google Chrome, go to chrome://extensions/, and turn on developer mode (the toggle in top right corner)
- Click Load Unpacked
- Select the extension folder in your local copy of this repository
- Get translateLocally
- Once you have a binary of translateLocally, run
./translateLocally --allow-client AABBCC
whereAABBCC
is the extension ID Chrome assigned to your installed version of this extension. - (Restart Chrome? Not sure this is necessary)
- Go to the Extension options page of this extension and select TranslateLocally as translation provider.