Solved

Google Translate

Posted on 2014-11-20
2
217 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

729 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