开发者

Google Translate translates inline Javascript Code

开发者 https://www.devze.com 2022-12-27 08:02 出处:网络
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 chos

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


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消