Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8961535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:54:59+00:00 2026-06-15T15:54:59+00:00

I have Google Translate on my page. It looks like a drop-down list, but

  • 0

I have Google Translate on my page. It looks like a drop-down list, but all other drop-down lists on my page have another style. So I created jQuery function which change Google Translator drop down list styles. This function adds or deletes some style parameters. I’d like to know when I should call this function? In current code I call it after 3 sec. after document.ready

  $(document).ready(function () {
      setTimeout(wrapGoogleTranslate, 3000);
  });

Current situation is that I hide the Div where Google translate is placed and show it after it’s styles are corrected by my function. It means that my page loads, then it wait for 3 seconds, and then Google Translate appears with corrected styles.

I’d like to know how I can determine that Google Translate drop-down was loaded and then call my function to change the style. I don’t want to make users wait for 3 seconds (maybe in some situations Google Translate would loads more than 3 seconds, then my function would never be executed).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:55:00+00:00Added an answer on June 15, 2026 at 3:55 pm

    I recently wanted to change “Select Language” to simply “Language”, so I also had to run code after Google’s code had been executed. Here’s how I did it:

    HTML

    It’s important to set Google’s div to display:none — we’ll fade it in with JavaScript so that the user doesn’t see the text switching from “Select Language” to “Language”.

    <div id="google_translate_element" style="display:none;"></div>
    <script type="text/javascript">function googleTranslateElementInit() {new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, gaTrack: true, gaId: 'UA-35158556-1'}, 'google_translate_element');}</script>
    <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
    

    JavaScript

    function changeLanguageText() {
      if ($('.goog-te-menu-value span:first-child').text() == "Select Language") {    
        $('.goog-te-menu-value span:first-child').html('Language');
        $('#google_translate_element').fadeIn('slow');
      } else {
        setTimeout(changeLanguageText, 50);
      }
    }
    changeLanguageText();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have many elements on page and all of which i want to translate
I have an HTML page, and I would use Google Translate to translate only
The google translate that you actually embed on your page... http://translate.google.com/translate_tools If you have
I have site that works fine but when i put it through Google translate
I have just added a google translate in website.And set the default language English.
I have google'd it, and tried some examples, but I always get stuck. This
I have google analytics on my site. One page has a button which when
I am using the google web translate element on my page. For those that
I've been experimenting with google translate api v2 but I couldn't get it working.
I have a tumblr blog. I want to put a Google Translate Tool &

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.