Solved

Google Translate

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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
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 …
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…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

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