views:

285

answers:

2

Hi, I have some PHP code that sends a section of html code including some inline Javascript code by curl to google. When i get it back from Google translated into the language that i chose, the Javascript code has been translated too.

Any ideas as to how i can stop Google translating my inline JavaScript code? Thanks, M

+4  A: 

Don't use inline JavaScript code at all...

Fábio Batista
I have no choice as it is littered through all of my customers site
phpNutt
+2  A: 

You shouldn't really send any code, whether its HTML or Javascript, to a language translator. I suggest translating it before encapsulating it in HTML or parsing it out of the HTML before translating.

Chris