include "/tk/inc/bing.js"
######################################################
#####
######################################################
m::proc -public translate {
-to:required
{-test 0}
} {
Documentation goes here...
} {
Trace
if {$test} {
division [style margin 30px background #FFF height 300px] class="clearfix" {
button "Try Me" class="btn"
h1 dom-data="name" "Click here"
p "this is a test"
bullet_list {
li "Mel was here"
}
table width="100%" {
table_row {
table_data {
put "Hello World"
}
}
}
}
}
# CONVERT EVERYTHING TO $to
javascript {
put [subst {
jQuery(document).ready(function() {
jQuery("label,option,a,p,h1,.btn,td,li").each(function() {
var obj = jQuery(this);
var txt = obj.text();
if (txt == "") {
txt = obj.val();
}
ajaxTranslate(txt, "en", "$to", obj);
});
});
}]
}
}
# source "/RedOlive/samples/bing.html"
# translate -to "fr" -test 1