Posted:August 23, 2006

Guidance and Sample Code for Multi-Lingual Translations of Your Blog or Web Site

NOTE: With Google’s recent announcement of its language translation service (see http://translate.google.com), there is no longer a use or need for this AI3 blog to maintain its language translation service and Javascript. Thus, the downloads listed below are still available, but no longer maintained or supported. MKB

Author’s Note: There is zipped HTML and Javascript code that supports the information in this post. If you develop improvements, please email Mike and let him know of your efforts.


Download Language Translator and JS code file Click here to download the zipped file (2 KB)

For those of you that follow BrightPlanet, we have been moving aggressively for some time now into international document harvesting and all that that implies regarding language and encoding detection and roundtripping. In fact, there is a fairly definitive tutorial post on my blog that deals with these so-called i18n internationalization issues that has become quite the reference on these matters. With its partnership with Basis Tech, in fact, BrightPlanet now can harvest documents in about 140 different languages with accurate encoding translation in multiple legacy forms for about 40 of them and morphological analysis for another 20 or so. There can be no doubt that the need for multi-lingual searching and harvesting and encoding support is an abiding trend of the evolving Internet.

So it was a great surprise and pleasure to encounter Lorelle VanFossen‘s blog site where she has cleverly linked in Google’s machine language translation capabilities. Her explanation of that approach is provided by this specific posting. So, using these techniques, my site has now embraced these language translation capabilities for the nine languages shown as follows:

So add some language translation links to your sidebar or posts and help spread the word about your blog to the world. (Go ahead, actually click on these!):


Translate into Spanish


Translate into German


Translate into French


Translate into Portuguese


Translate into Italian


Translate into Arabic


Translate into Japanese


Translate into Chinese


Translate into Korean

You will also note that my blog now has a standard panel link (different format; see below) to translations into these languages on the main and subsidiary pages.

Try this! It’s fun and impressive. Some have criticised the “ultimate” quality of these translations, but Google improves them continuously over time.

Actual Implementation and Javascript

You should note that Google itself limits the amount of actual text it will translate at any given time. Thus, if you use the translate links
from this site’s main page with its many cascading prior posts, you will see only a few posts translated. If you use the links on specific posts, however, you will find most of the content even for my longish entries translate fully.

Also, these translations are uni-directional. Don’t continue to cascade from language to language; you will get processing errors. Always begin with the English pages as originally published on this site.

There are also two other flaws in the straight implementation as described above:

  1. Google’s listing of machine translated languages is growing, and the nine listed above already take up some real estate for the languages listed. We’re probably already past the point of buttonitis
  2. There is not context for picking up the dynamic URL of wherever a user might be in a Web site or blog.

So, Graham Beynon, one of BrightPlanet’s senior developers, wrote a more generalized Javascript approach, a variant of which presently appears on this site. Via standard option listings, the languages can easily be expanded should more become available from Google, simply by adding another option entry and using the appropriate two-letter language code. Great work, Graham, and thanks.

If you inspect the source code, you’ll also see a couple of other choices you can make in the code operation by removing or adding comments. And, of course, should you choose to use this snippet, make sure you get rid of the test query and remove the HTML header stuff. You can, however, use the LanguageTranslator.html as is.

To download this file, click on the link at the top of this post. And, enjoy!

So, Welcome to Adaptive Information on the Modern Web. Or, rather:

  • In Spanish — Recepción a la información adaptante sobre el Web moderno
  • In German — Willkommen zu den anpassungsfähigen Informationen über das moderne Netz
  • In French — Bienvenue à l’information adaptative sur le Web  moderne
  • In Portuguese — Boa vinda à informação adaptável na correia fotorreceptora moderna
  • In Italian — Benvenuto alle informazioni adattabili sul fotoricettore moderno
  • In Arabic — ارحب التكيف معلومات عن شبكه حديثه
  • In Japanese — 現代網の適応性がある情報への歓迎
  • In Chinese (simplified) — 欢迎在适应现代信息网络
  • In Korean — 현대 웹에 적합한 정보에 환영.

Schema.org Markup

headline:
Guidance and Sample Code for Multi-Lingual Translations of Your Blog or Web Site

alternativeHeadline:

author:

image:

description:
NOTE: With Google’s recent announcement of its language translation service (see http://translate.google.com), there is no longer a use or need for this AI3 blog to maintain its language translation service and Javascript. Thus, the downloads listed below are still available, but no longer maintained or supported. MKB Author’s Note: There is zipped HTML and Javascript […]

articleBody:
see above

datePublished:

8 thoughts on “Guidance and Sample Code for Multi-Lingual Translations of Your Blog or Web Site

  1. I’m surprised that you consider machine translation to be “ready for prime-time”.

    You observe that “Some have criticised the “ultimate” quality of these translations”. That could be argued to be glossing over some serious inadequacies …

    Here is a de-to-en translation of a professional translator’s home page (belonging to my sister-in-law):

    http://www.englishelements.com

    English text:

    A very warm welcome to englishelements.com

    We invite you to work and play with the many colourful faces of the English language.

    Click to see the diverse areas of our extensive training, translation and communication activities in Salzburg and Vienna.

    Or to download our newsletter and to see our price list .

    Do contact us if you need any information about language training, translation or support.

    english elements open for communication

    Google translation link:

    http://translate.google.com/translate?u=%20http://www.englishelements.com%20&langpair=de%7Cen&hl=en%20&ie=UTF-8&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools

    Ostensible “translation”:

    Cordially welcomely with englishelements.com

    Experience the many color-glad faces of the English language for work and spare time.

    Click and experience you more over our activity of many years in Salzburg and Vienna within the ranges training, translation and communication.

    Click and get yourselves you our newest new type character and if you liked to have overview of our price list.

    Contact us, if you need information or consultation concerning language training and translations or simply assistance.

    english element open for communication

    Whatever “ultimate quality” means, I’m not persuaded that the translation is worth the candle.

    Perhaps machine translation is in the same league Dr Johnson’s observation about women and preaching: “Sir, a woman’s preaching is like a dog’s walking on his hinder legs. It is not done well; but you are surprized to find it done at all.”

  2. Google’s translation ability, as you say, is very limited. So I’m now testing Global Translator and Angsuman’s Translator WordPress Plugins on a couple of different full version WordPress blogs to see what the response is and how I like the different translations. While they are similar, Angsuman’s requires curl and Global Translator doesn’t. I’ll be reporting on these soon, so stay tuned.

  3. I don know but why i don find such informative and profitable blogs so often,I suspect blogging world is becoming so small that we cant find such lucrative blogs like this one.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>