Displaying 1 result from an estimated 1 matches for "translatechildren".
2007 Jun 01
5
il8n with Prototype
I''d be grateful for feedback regarding the following:
/* Iterate over elements and lookup translation for language in JSON
dictionary */
function translateChildren(parent, language) {
var phrases = parent.getElementsByClassName(''lang'');
phrases.each(function(p) {
var phrase = p.readAttribute(''for'');
p.innerHTML = translations[phrase][language];
});
}
/* Get language from Cookie */
function getLanguage() {
docum...