Our new Vivaldi Translate feature is designed to let you translate page text quickly and easily. In addition, Vivaldi respects your privacy, unlike some translator extensions or built-in translators like Google Translate.
Now is the time for a deeper dive with Vivaldi developer Petter Nilsen, who took over Vivaldi Translator. He explains how Vivaldi Translate works “under the hood,” and shares some of the behind-the-scenes challenges our team has overcome to bring translation capabilities to the Vivaldi browser.
How does Vivaldi Translate work?
Petter: It works in conjunction with the Vivaldi Translate server, which enhances page translation. This translation server was created by our partner Lingvanex. It uses machine learning and works with several graphics cards (graphics processor units) hosted at Vivaldi’s data center in Iceland. GPUs are uniquely suited for some heavy computing tasks, especially machine learning, compared to processors.
The translation process follows these steps:
- When you visit a page, all the text on that page is decompressed and transferred to CLD v3 (Compact Language Detector v3), a neural network model that recognizes the language of the page and notifies the browser. (For more information on the CLD v3, go to here.)
- The browser compares the language of the page to the language specified for it. If they are different, it will display a pop-up window with the button to turn the page.
- If you click the Translate button, the browser sends a script to the page renderer to translate the page.
- The renderer injects a script into the page and prompts it to translate the page into a specific language.
- The script decrypts all the text on the page, sends it to the Lingvanex translation server, and waits for a response with the translated text. It then replaces the original text on the page with the translated text in the language of your choice.
- The renderer queries the script until the translation is complete or has failed, and forwards the notification to the browser.
- The browser then displays a pop-up window explaining either the page translation or the translation failure. This pop-up usually disappears after the translation, and the Vivaldi address bar icon is highlighted instead.
All this means that the Vivaldi Translate provided by Lingvanex allows you to translate the entire page from any of the supported languages by default into the language of your Vivaldi installation (or other drop-down menu languages) with a single click. You can also edit the translation with the following options:
- Always turn – always translate the current language
- Never turn – never be asked on any website about the current language
- Never translate this site – never ask for a translation on that site
- Provide page translation – Disables automatic translation of automatically displayed pages and pop-ups. The button remains in the address field so you can translate the function or translate the page manually.
How did you and your team get the Vivaldi browser to work with the Lingvanex translation server?
Petter: Many parts need to be in place for translation support to be possible.
First is the interface and all its options. The browser must also be able to retrieve a list of languages that Lingvanex translation server supports. This must be done at regular intervals so that new supported languages appear in the interface.
But at the end of the day, the most challenging part, per browser, is to remove all the links from the script so that it can decode the text and send it to the translation server API and replace the web page. text with translated version. This can happen quite often as you scroll through the page, so optimization strategies need to be in place. The processing of this script is ongoing and will improve over time as we receive more feedback from users.
What other obstacles do you need to jump to make sure Vivaldi Translate works?
Petter: One particular (and pricey) challenge is during these pandemic times (not to mention the explosion of bitcoin mining). get enough graphics cards perform translations.
The second is that whenever we fix decompression problems on a website, we need to make sure we have enough unit tests to cover fixed cases and not break other pages.
Similarly, when adding new languages to the Lingvanex translation server, we need to ensure that this also works in the interface. In some cases, we need to add support for these languages in the interface to make them appear with their local language name.
Some pages have additional translation challenges, such as iframes or dynamic pages, where text can be deleted and re-inserted.
We’ve also seen that some forums don’t load pages or posts through a “normal” mechanism. This means that they do not trigger the normal language detection mechanism, so making a language challenging without punishment is challenging.
Of course, these are not necessarily unique challenges for Vivaldi Translator, as similar things can be seen in other browsers. We expect to resolve or improve them as we move forward.
Despite future challenges, we are constantly working on optimizations and fixes to improve the user experience.
Currently, Vivaldi Translate is limited to translating the page. Are there any plans in place to expand its functionality?
Petter: The translation of the selected text into the web pages is already in progress. We’ve also started planning to reveal the translations to other parts of the interface, like Vivaldi Mail, in the panel and possibly other places as well. Stay tuned!
Getting Vivaldi Translator from Lingvanex is easy! Only download Vivaldi 4.0 for Windows, Mac, and Linux computers, mobile phones and tablets with Android 5 or later, and upgraded Chromebooks. Get it now. 🚀
Have you tried Vivaldi Translator already? We’d love to hear what other languages and translation features you want to see your browser.