Introducing Google web translator to Drupal.

For some years now, Google has been providing users, webmasters and web developers with some nice and useful web related tools. Some of them are better known than others, and some are not in use anymore. But having your site’s content translated has always been a top necessity, especially if your site targets a multicultural audience. One of Google's recently improved tools, from their content translation tools, is Website Translator.

For some years now, Google has been providing users, webmasters and web developers with some nice and useful web related tools. Some of them are better known than others, and some are not in use anymore. But having your site’s content translated has always been a top necessity, especially if your site targets a multicultural audience. One of Google's recently improved tools, from their content translation tools, is Website Translator. This tool’s engine is based in their Google Translator Toolkit, which uses translation memory (TM) to significantly improve the quality of the translation. It also provides a way to manage your own set of translation content.

When you are a Drupal site manager and/or developer, having a quick way of providing the visiting user with a preset of available languages and quality translations is always a plus. For this reason, we wrote this small module to allow Drupal web administrators to quickly set and customize Google’s website translator in their systems.
The module essentially provides an administration UI to define certain parameters needed to build the javascript code that, otherwise would have to be regenerated every time a change was needed. See below a sample screenshot of an admin UI:

Once your configuration is ready, the administrator user can expose the language selector through a menu link .
Setting up the menu link is as easy as adding a new link item to one of the site’s menus and setting it's path to: <google-translate>.
Once the page is rendered the module’s javascript part will take care of inserting all the code needed to achieve the proper behavior and presentation.
We considered other ways of presenting the language selector, but we decided to use a menu link to allow site administrator to optionally expose a disclaimer dialog to the visitor. In this way it could be used to, for example: warn the visitor that the translation services provided were not originated by the site itself, rather that it is a third party service. You can disable this functionality by leaving the disclaimer textarea option in blank in the administration UI.

Using this tool has several advantages. For one, the quality of the translation, I can speak for the spanish versions I’ve seen, they are pretty accurate and refreshingly not “robot-ish”, and that’s one of the other advantages: the use of the translation memories (TM), that allows for more fine tuned translations. Another advantage is the replacement of text happens really fast, of course this depend on the amount of text to process, and the client computing power, but with today’s equipment it should provide an instant seamless translated version.
Although the module is in use in a couple of sites now, it is still a sandbox in drupal.org @ http://drupal.org/sandbox/fxarte/1473726
If you like it and find any issues or think a new feature may be a good addition please go to its issue queue.

 

Felix Silberstein