Solved

Google Translate

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

839 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