NavigationUser login |
How the flags workThe flags above each entry in this site cause the text below the flags to be translated by Google Translate, which has a fairly good go at translating the content. When you click on a flag some jQuery code looks at the text to be translated, then the jQuery Google translate module is invoked to send the English text to Google for translation into the language you have selected (I know what language because it is encoded in the alt tag of the flag image). Google returns the translated text and it is displayed in place of the existing text. The text is stored in a cache on your browser so you don't call Google Translate again unnecessarily. The only other bit of magic is that when you display a page some jQuery code looks for articles and places the flags above each article. The flag icons come from famfamfam.com (http://www.famfamfam.com/lab/icons/flags/). Feel free to download and use my jQuery code (http://www.greg-wright.co.uk//themes/garland/translate.js). Enjoy!
|
Recent blog posts |