?
Solved

Google Translate

Posted on 2014-11-20
2
Medium Priority
?
248 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 2000 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

770 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