2016-07-28 5 views
1

Google 번역에서 제공하는 플래그 위젯을 추가 한 코드 조각을 삽입하여 더 많은 언어로 된 웹 사이트를 가질 수있게되었습니다. 플래그가 나타나고 커서가 링크로 인식하는 것처럼 보입니다. Chrome에서 업로드하지 않고 테스트 할 때 플래그를 클릭해도 아무 일도 일어나지 않습니다.
코드를 작동시키기 위해 업로드해야합니까, 아니면 코드의 문제입니까? 이 바보 같은 질문 인 경우
미안 해요, 난이 모든 : 아주 새로운 해요Google 번역 html 위젯이 작동하지 않습니다.

코드 : <script ...하기 전에 열려있는 양식 태그, 제일 먼저이 누락

`<script language="JavaScript"> <!-- 
document.write ("<input name=u value="+location.href+" type=hidden>") 
// --> 
</script> 
<input name="hl" value="es" type="hidden"> 
<input name="ie" value="UTF8" type="hidden"> 
<input name="langpair" value="" type="hidden"> 
<input name="langpair" value="es|en" title="English" src="images/UK.gif" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30"> 
<input name="langpair" value="es|pt" title="Portuguese" src= "http://photos1.blogger.com/img/43/1633/320/13539966_0d09b410b5.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30"> 
<input name="langpair" value="es|fr" title="French" src= "http://photos1.blogger.com/img/43/1633/320/13539949_e76af75976.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30"> 
<input name="langpair" value="es|de" title="German" src= "http://photos1.blogger.com/img/43/1633/320/13539933_041ca1eda2.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30"> 
<input name="langpair" value="es|it" title="Italian" src= "http://photos1.blogger.com/img/43/1633/320/13539953_0384ccecf9.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30"> 
<input name="langpair2" value="es|ar" title="Arabic" src= "http://photos1.blogger.com/blogger/3709/485/1600/arabic-flag.gif" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30" /> 
</form>` 

답변

0

:

<form action="http://www.google.com/translate" > 

로컬 파일에서 테스트 한 결과 플래그를 누르면 translate.google.com으로 전송됩니다.

그러나 Google은 번역을 위해 HTML 페이지에 대한 액세스 권한이 있어야하므로이 위젯은 인터넷의 공개 웹 사이트에서만 작동합니다. 로컬 또는 인트라넷 사이트에서 작동하지 않는 것 같습니다.

관련 문제