Important HTML Tags and Structures

LanguageCache is a Professional Tool

There are two levels to LanguageCache is a tool for companies who manage one or more multi-lingual websites. While it is easy to install and easy to use, it is designed for professionals who are looking to produce a professional product. To produce an efficient translation, it is best to make some decisions about the items you want to translate and how to define them to the various translation tools availible.

LanguageCache seeks out the "LANG" attribute of an HTML tag and converts it from the language it currently holds to the new language. Rather than cycle through all the HTML tag types on your webpage, the script is designed to allow you to choose - per page - which tags you will look for.

Focusing on Specific HTML Tags

There are two primary scripts used by LanguageCache, "translate_cache" and "translate_objects". Both function in a very similar way. You define the HTML tag and tell it the new language you'd like to have the innerHTML contain. For example:

translate_cache('p','es')

This will seek out all of the <P LANG="EN">hello world</P>, send that text to LanguageCache and ask if there is a custom translation for that text from English into Spanish for that URL - or in the Global Translate List for that Domain.

If it finds custom text in Spanish for hello world, it will replace the contents with your custom text. (even if your text is completely different! It could be an image, it could be a link to another page, it is simply "content" to the database). After it does the switch, it changes the LANG attribute to "ES", so all browsers and future scripts know the contents are in Spanish.

If you have not saved any custom Spanish text for hello world, it simply moves on to the next Element you have defined to be sought out.

Once you have finished cycling through your selected HTML tags, you can use Google's translate, Microsoft's Translation, or Systrans APIs to continue through the page. All you need to do is send them the remaining sets of content to translate. LanguageCache doesn't provide the actual dynamic translation (there are really only those three in existance), but we do offer the scripts to access Google's Translate for free.

translate_objects('p','es')

If you are using Google's translation API, you can simply use our "translate_objects" script. It will do the exact same thing as the LanguageCache translate_cache script, but it uses Google's Dynamic Translation to do the work. If you are satisfied with the Google Translation for your website, you can actually use this script for free.

Used together, the result is a fully translated page, with custom content where available and dynamic content where it is not.

Clean Code

Both of these scripts use Javascript's innerHTML feature to determine the contents of the HTML tags as well as replace them with new content. If the website you are translating is sloppy, you are bound to run into some problems. WYSIWYG editors often break sentences up into multiple spans and multiple paragraphs, sometimes making it impossible for any script to determine where a sentance begins and ends.

In this case, you may need to do some "cleanup" work or reconsider some more professional applications, such as SYSTRANSlinks, which has the ability, experience and processor power to deal with programming that is rather messy. LanguageCache and Google's API run at the browser level, where the user's computer is rebuilding the page, while SYSTRANSlinks has a massive machine which can rip through huge amounts of code. Unfortuantely, you lose a huge amount of customization features and are restricted to a single company.

Specialty Scripts

LanguageCache is designed to handle much larger content sets and Google's API or Systrans's API. At our specialty service levels, we can actually cache the full HTML of entire pages, including links to style-sheets, script files, images, and even Flash files. Essentially, you can have a webpage called, "my_products.html", where the Bulgarian translation might be an entirely different page, but in reality, it is the exact same document, but the contents of the document object have been replaces with your cached content.

You can even change the dropdown menu to say,"view my specialty products", rather than "Bulgarian" and have that translation actually be an entirely different webpage, but without reloading the document! In cases like this, you would use the "VAR" HTML tag, which would redirec the program to our larger content based databases.