Simple Localization System (SLS)

We’ll be demoing some fun new stuff at Foo Camp in June (and possibly one other conference). Watch for our WordPress plug in, coming soon.

We also figured out a simple, but very effective way to localize software and documentation. If you’re a software or web service publisher, read on to learn more. It’s a simple solution to a tricky problem, and will work real well with the new tools due out in the next month.

Software and website localization is one of those things that most project managers avoid doing. If they do it at all, it is almost always an after-thought and is not done very well except in large projects. We’re working on a simple token based system for localizing applications and websites. This will probably evolve a bit more in the next month, but we’re pretty close to a final specification.

The basic idea is to create tokens for each snippet of text, html, etc that is needed in a website, graphical user interface, etc. The token is simply a nicknamed object, e.g. mywebsite.loginbutton, that is replaced with text, html, or any other data type. This in of itself is not new. Many web publishing systems use this type of approach. I built a similar content management system for my first business, an online buyers guide for phone systems, ten years ago (though not for the purpose of site localization).

SLS is, as it suggests, a simple way to localize applications and websites. The system works as follows, and is easy to implement in a wide range of scenarios. Let’s imagine that you have a web user interface that you want to make available in many languages. With SLS, you simply do the following.

  • Any object that needs to be localized, a button label or paragraph of text, is referenced as a token (e.g. mywebsite.faq)
  • When a user visits your site, you identify their language preference via a drop list or browser preferences, this is a locale code such as es-ar (Argentine Spanish).
  • The web application does a simple replace operation to replace the token with the contents of a file that is cached on its local disk (e.g. /localization/mysite/es-ar/faq), if there is no definition for that token in a the desired locale, you try to fetch a copy from http://localizationserver/mysite/es-ar/faq. If that doesn’t work you revert to the default language or display an error message.

All you’re doing is a server side include from local disk (after caching a file from a network token server if the local file does not exist or has not been updated).

Creating And Maintaining Localization Sets

This is easy because the localization server is just a web server that stores files in an organized directory tree, typically in the structure:

/_projectname_/_language-locale_/_objectname_

The web server or application simply mirrors these files by doing HTTP downloads from:

http://serveraddress/_projectname_/_language-locale_/_objectname_

You can make the token management system simple or fancy. For a simple system, you’d just create the tokens in a text editor, upload them via FTP. That’ll work for closely managed projects. For a fancy system, you can create a web based front-end that allows translators to view, add and edit translations for any token. This will be a good idea for more complex projects where the inventory of tokens is changing constantly. Even the fancy version of this is pretty simple to build.

Volunteer Translation and Localization

A website or application that uses this system can be designed so that users can participate in translating and localizing the tokens. This can be done via a separate translation and localization interface, or via an in situ localization tool that displays a small icon next to each token.

Dedicated Translation and Localization Interface

In this scenario, translators go to a dedicated web interface where they can view, edit and contribute translations to the tokens used by the application or site. Translators may be volunteers, or may be paid, or some combination of the two. The web interface displays a list of tokens for the source language website or application. Translators will then create translated tokens in whatever languages they speak. Again, the tokens can represent anything. Some might be labels for menu buttons, while others are full-length documents. This makes the system very flexible.

As the translations are created and updated, the translated tokens become visible to readers and users.

In Situ Translation & Localization Tool

Chris Messina made this suggestion, and offered a great example of what this might look like. Here we ask users if they want to help localize a website or application. If this option is enabled, it displays a small WWL icon next to each token or UI element. Clicking on this icon triggers a popup form that asks the user to contribute or edit a translation for the object. This is then stored by the localization server and, subject to system rules, will become available to other users.

insituwwl1.jpg insituwwl2.jpg

This approach will enable translators to understand the context of what they are translating (a menu bar for example). The translations are saved to the localization server, which publishes them via the simple HTTP method outlined above. We assume that developers will want to implement access and workflow control measures on top of this basic process. The goal of this document is to outline the basic process, which can be adapted as needed to specific projects.

Summary

This tokenized approach to the problem of localizing a website or application, while simple, will work well for many applications. By utilizing existing services, developers do not need to build an unwieldy and difficult to understand system. The solution can be as simple as a web/ftp server that hosts dozens or hundreds of files in an organized directory tree. The application or website that uses these tokens simply does a file read and replace operation which, with caching, will be fast and not involve complex back-end systems or a big performance penalty.

We’re working on some tools based on this approach that we’ll demo at Foo Camp in June. So stay tuned for more information. If you’d like to experiment with this in your applications, send us an email. Thanks.

Advertisements

5 Responses to Simple Localization System (SLS)

  1. I have to say, that I can not agree with you in 100%, but it’s just my opinion, which indeed could be very wrong.
    p.s. You have an awesome template for your blog. Where have you got it from?

  2. Hey, nice tips. I’ll buy a glass of beer to the man from that forum who told me to visit your blog 🙂

  3. SYPETECTOTS says:

    Народ! Умоляю подскажите

    здесь видел ет gamebulletin.ru

  4. Rather great post, genuinely useful stuff. Never thought I would discover the facts I would like right here. I’ve been hunting all over the web for a while now and was starting to get frustrated. Thankfully, I stumbled onto your website and received exactly what I had been struggling to find.

  5. Thanks for this! Ive been looking all over the internet for this.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: