//Dictionary var URL = null; var Languages = ["georgian","english","russian","german","french","italian","spanish"]; noun_type_dyctionaryLanguage = new CmdUtils.NounType( "Language",Languages); CmdUtils.CreateCommand({ name: "dictionary", icon: "http://www.lingvo.ru/upload/images/Lingvo.ico", description: "Translates first word", author: { name: "Irakli Gozalishvili", email: "rfobic@gmail.com"}, homepage: 'http://rfobic.blogspot.com/2008/10/ubiquity-command-dictionary.html', help: 'Select or type the word to translate', takes: {"word": noun_arb_text}, modifiers: {from: noun_type_dyctionaryLanguage, to: noun_type_dyctionaryLanguage}, preview: function(pblock, noun, attributes) { var loading = function() { pblock.innerHTML = CmdUtils.renderTemplate(template, { content: ' Searching for '+params.w+'' } ); }; var translate = function(from,to) { loading(); jQuery.get(url, params, function(html) { if(html=="") { if(params.w!="") { params.w = params.w.substring(0,params.w.length-1); translate(from,to); } else { pblock.innerHTML = CmdUtils.renderTemplate(template, { content: 'No matching words found' } ); } } else { if (resource != 'translate.ge') { jQuery(pblock).append('