Solved

Google Translate

Posted on 2014-11-20
2
197 Views
Last Modified: 2014-11-24
I've got Google Translate code as follows (I've hashed out the UA number):

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

Open in new window


However, it looks fairly ugly! It's at the bottom of my website, www.filecats.co.uk

Is there a way to get it floating, maybe in the top-left hand corner, or is there at least a way to make it more pretty.
0
Comment
Question by:Phillip Burton
2 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 40455731
The styling comes from a file translateElement.css which is hosted on Google in the same path as the script.  If you can find it and downolad a copy to your server then you could modify the styling, but you would then have to server the file from your own server, and if Google makes any kind of change in the translation widget it might break because is needs a different version of the css file.

I suspect the css file is brought in by the scripting so you would also have to modify to point at your local version instead of the version hosted on Google, so that would force you to basically host your custom version of the widget on your own site.

Cd&
0
 
LVL 24

Author Closing Comment

by:Phillip Burton
ID: 40461614
Thank you.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now