An alternative to Google Translate’s Website Translator widget that can work with any HTTP backend.
Here are some example pages:
On December 4, 2019 Google discontinued its popular Google Translate Widget. The widget can no longer be added to new sites. It is currently still available for websites that already have it installed.
Technically, their widget stills works if you have the code for it, but there’s no telling when it will stop working. As of June 23, 2021, their embeddable snippet is still working, even though the widget was discontinued in 2019.
The goal of this project is to revive the simple “plug and play” usage of the legacy Google Translate Widget, but to make its functionality future-proof and transferable to other translation API providers.
Built-in branding images that follow attribution guidelines
Progress indicators are shown while translations are in progress
data-rosetta-skiptranslate="true". Applying these to a parent, means that it applies to its children as well.
The code available in this widget details the UI portion of the widget. However, a separate API server must be implemented and maintained by those who wish to utilitze this widget.
Translation APIs aren’t free, but a sample API server is available for prototyping. I make no guarantees that this API server will remain active. Don’t rely on this API server in production.
Sample API server:
The schema/model that a separate API server must implement is detailed below.
MutationObserver are IE11 compatible, but
IntersectionObserver is not. There is nothing we can do about this.
To preview this OpenAPI 3.0 spec, open petstore.swagger.io. At the top right, enter the following URL and press “Explore”:
It should look like this: