Closed umimehar closed 3 years ago
this.find(settings.css).each(function(i) { var $this = $(this); var trn_key = $this.attr("data-trn-key"); if (!trn_key) { trn_key = $this.html(); $this.attr("data-trn-key", trn_key); //store key for next time } if($this.nodeName === 'INPUT'){ var placeholderValue = $this.attr("placeholder"); $this.attr("placeholder", that.get(placeholderValue)); } $this.html(that.get(trn_key)); });
https://github.com/umimehar/translateAll.jquery.js i have created this fork for translate every thing on DOM :)
I was in need to translate the placeholder too. so i made this snippet of code.