Problem translating placeholder text in input type="text"
This is my sample code:
Html:
<div id="google_translate_element" style="float:left; padding-left:15px"></div>
<!-- Need to translate this placeholder text -->
<form><input type="text" placeholder= "Enter your name" />
<input type="submit" value="Submit" />
</form>
JavaScipt:
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'ca,da,de,el,en,es,fr,it,ja,ko,nl,pl,pt,ru,sv,tl', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
CSS:
<style>
div#google_translate_element div.goog-te-gadget-simple{background-color:green;}
div#google_translate_element div.goog-te-gadget-simple a.goog-te-menu-value span{color:yellow}
div#google_translate_element div.goog-te-gadget-simple a.goog-te-menu-value span:hover{color:#ffffff}
</style>
translater example is in
JSFiddle:
http://jsfiddle.net/ulak/zDUYL/
Please mention any other way to translate placeholder text using google translate
input
element. And what do you mean by any other way? Have you found a way? – Frivolous