// ==================================================================== // Google Translate Dropdown Box // Copyright (C) 2006 http://isnoop.net/ // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // http://www.gnu.org/copyleft/gpl.html // // ==================================================================== function dotrans(lang) { myurl = window.encodeURIComponent(document.location.href); if(document.location.href.search("translate_c") >= 0) { regexp = new RegExp(/&u=(.*?)&/); match = regexp.exec(document.location.href); myurl = match[1]; } var url = "http://translate.google.com/translate?u=" + myurl + "&langpair=en%7C" + lang + "&hl=en&safe=off&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools"; if (lang != "") { top.location.href=url; } } var lang = new Array(); lang["es"] = "Espanol"; lang["de"] = "Deutsch"; lang["fr"] = "Francais"; lang["it"] = "Italiano"; lang["pt"] = "Portuguese"; lang["ja"] = "日本語 Japanese"; lang["ko"] = "한국 Korean"; lang["zh-CN"] = "中国 Chinese"; lang["en"] = "English";