Using JavaScript to make website localization easier

Source: Jon Ritzdorf, Moravia
Story flagged by: Jared Tabor

Until recently, website localization was primarily approached in three ways.

  1. In the traditional file-based approach, project managers would take their loose collection of files (e.g., HTML, PHP, XML, etc.) and simply hand the content off to translation. Those translated files, once returned, would be passed on to the web developers to build the target-language versions of the site.
  2. Then there was the API “connectors” approach to website localization. Using this method, your web content management system (WCMS) (e.g., Drupal, WordPress, Joomla, etc.) could be connected to a translation management system (TMS) via an application programming interface (API). Source content would be pushed to the TMS through the connector to the translation vendor and routed back to the WCMS through the API.
  3. From about 2010 onward, we saw the rise of DNS proxy or “mirror-based” approaches to localization. No fussing around with APIs—you would get a web mirror where your localized website is stored and managed by a third-party server with a built-in TMS.

Each of these legacy methods have their associated risks and opportunities as well as varying levels of localized content management involvement.

JavaScript to the rescue

Today, with advanced developments in JavaScript extensions, a number of companies are making web localization even easier. You just add the company’s provided JavaScript code to the web pages that you manage, and a sort of “search and replace” occurs of the source language content with the target language content.

In a nutshell, the JavaScript spiders the English content and does a near-instantaneous “switcheroo” with the visitor’s preferred language, provided by your translation service, as the page renders. For those of you who want a more detailed explanation, TAUS has a great article on the subject.

These third-party web localization services have a number of features in common:

  • Simple one-line JavaScript code placed on each page for which you want to have translated content
  • Online editor for translation
  • Option for in-context editing of translated content
  • Option to add machine- or human-translated content

Read more >>

Comments about this article



Translation news
Stay informed on what is happening in the industry, by sharing and discussing translation industry news stories.

All of ProZ.com
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search