We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Google Webpage Translator Plugin Won't Function

How Do I?

trentadventurefree's avatar
trentadventurefree
5 posts
9 years ago
trentadventurefree's avatar trentadventurefree

Hey everyone,

I’ve been trying to install Google Webpage Translator for ages on our websites. I have attempted placing the code in the header template, footer template, a specific page. I have change the language of the browser and my whole computer.

Currently I am embedding the Javascript parts of the “plugin” from Google into the footer template and that footer template contains the html component of the plugin and is embedded into all of the other pages.

While it doesn’t work at all it does load all the required js and css files - I am out of ideas - any one got any suggestions?

Running on 2.5

       
James Mathias's avatar
James Mathias
225 posts
9 years ago
James Mathias's avatar James Mathias

Hi,

Could you provide a link to the plugin you are trying to install? I’m unfamiliar with it, and would like to take a look at the documentation so I can help.

Also, if you could tell me what problem you are trying to solve by using this plugin that’ll help me determine if it’s the best approach with ExpressionEngine.

Thanks!

       
trentadventurefree's avatar
trentadventurefree
5 posts
9 years ago
trentadventurefree's avatar trentadventurefree

Hi James,

It’s not an EE plugin - it is literally a plugin developed by Google (https://translate.google.com/manager/website/)

The issue we are trying to resolve is the fact that we have customers from all over the world but our site is only in English - we would like to allow customer to translate it to there computers/browsers language

Thanks Trent

       
Robin Sowell's avatar
Robin Sowell
13,159 posts
9 years ago
Robin Sowell's avatar Robin Sowell

Interesting- I’ve never played with it. Is this what you’re talking about?

Hrm- I can’t find a good example there. Can you link us to the docs so I can take a look?

EE really shouldn’t be affecting things, but if you’re worried it is, what I always do is step back and get it working in a static html file. If it works there, it should work in EE and if it doesn’t, it’s generally easy to spot why.

       
Mike's avatar
Mike
2 posts
9 years ago
Mike's avatar Mike

I’ve done it with an EE site before - you can check it out here. It’s not too crazy (if this is what you’re talking about) and shouldn’t have any interaction with EE.

http://www.berkshireplanning.org/

Is there a Safecracker form or Channel Form on that page? Do you have a link?

       
trentadventurefree's avatar
trentadventurefree
5 posts
9 years ago
trentadventurefree's avatar trentadventurefree

Hi Mike,

That is essential what I am looking for but without the dropdown - the current Google plugin/Google Web Translate code allows it auto detect the browsers default language and then it asks the user if they would like it translated. outbackfree.com.au is the site I’m working on at the moment. If you look at the resources all the required resources have loaded from Google. So technically with those files loading the site would ask to translate but it doesn’t. I have also tried to with the element like your example - but no luck either. The issue appears to be with some of Google’s Javascript (probably conflicting with some of mine). Getting the error: TypeError: format.replace is not a function

You can see that in the Developer Tools/ Console

Any help would be amazing

Thank you,

       
trentadventurefree's avatar
trentadventurefree
5 posts
9 years ago
trentadventurefree's avatar trentadventurefree

Still having this issue

       
Robin Sowell's avatar
Robin Sowell
13,159 posts
9 years ago
Robin Sowell's avatar Robin Sowell

It looks like the TypeError is coming from that date.js. I think what I’d do- see if it works without the date.js code. I’d also be curious to see if the date.js is throwing an error without the google translator code on there. It might be.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.