Hello,
yes, on page load the combo doesn’t exist. That’s why you should place the code in a widget after the translator. Did you try it this way?
The other way is to edit the following file:
/templates/main.tpl
Lines 105-108, look like this:
function initializeGoogleTranslateElement() {
new google.translate.TranslateElement({
{{ options_formatted }} }{{ has_container.true:begin }}, "google_translate_element"{{ has_container.true:end }});
}
Modify it so it becomes:
function initializeGoogleTranslateElement() {
new google.translate.TranslateElement({
{{ options_formatted }} }{{ has_container.true:begin }}, "google_translate_element"{{ has_container.true:end }});
jQuery(".goog-te-combo").get(0).options[0].text = "Your text here";
}
Your line of javascript code looks good too. But perhaps is a good idea to try to use jQuery as little as possible, so you don’t have to be worried when the library gets modified or updated.