Differences between revisions 4 and 5
Revision 4 as of 2006-04-19 17:24:54
Size: 531
Editor: 211
Comment:
Revision 5 as of 2011-08-03 11:01:08
Size: 531
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
구글 번역기능을 MoinMoin에 action으로 추가해보다. (MoinMoin:ActionMarket 에도 올렸다.) 엑션 바에서 "GoogleTranslate" 를 선택한 후, 번역언어를 정하면, 새 창에서 번역된 내용을 보여준다. -- ["yong27"] [[DateTime(2006-04-19T07:58:48Z)]] 구글 번역기능을 MoinMoin에 action으로 추가해보다. (MoinMoin:ActionMarket 에도 올렸다.) 엑션 바에서 "GoogleTranslate" 를 선택한 후, 번역언어를 정하면, 새 창에서 번역된 내용을 보여준다. -- [[yong27]] <<DateTime(2006-04-19T07:58:48Z)>>
Line 10: Line 10:
[[Include(GoogleTranslate.py)]] <<Include(GoogleTranslate.py)>>

[Google] 번역

http://www.google.com/language_tools

번역의 질이 그다지 좋지는 않지만, 매우 빠른 시간안에 (while web-click) 결과를 돌려준다는 점은 매력이다.


구글 번역기능을 MoinMoin에 action으로 추가해보다. (ActionMarket 에도 올렸다.) 엑션 바에서 "GoogleTranslate" 를 선택한 후, 번역언어를 정하면, 새 창에서 번역된 내용을 보여준다. -- yong27 2006-04-19 16:58:48

   1 """MoinMoin action for GoogleTranslate by yong27, 2006-04-19
   2 """
   3 from MoinMoin.Page import Page
   4 
   5 template = """
   6 <form action="http://www.google.com/translate">
   7 <input type=hidden name=u value="%s">
   8 
   9 <font size=-1>from</font>
  10 <select name=langpair>
  11     <option value="en|de">English to German</option>
  12     <option value="en|es">English to Spanish</option>
  13     <option value="en|fr">English to French</option>
  14     <option value="en|it">English to Italian</option>
  15     <option value="en|pt">English to Portuguese</option>
  16     <option value="en|ja">English to Japanese BETA</option>
  17     <option value="en|ko">English to Korean BETA</option>
  18     <option value="en|zh-CN">English to Chinese&nbsp;(Simplified) BETA</option>
  19     <option value="de|en" selected>German to English</option>
  20     <option value="de|fr">German to French</option>
  21     <option value="es|en">Spanish to English</option>
  22     <option value="fr|en">French to English</option>
  23     <option value="fr|de">French to German</option>
  24     <option value="it|en">Italian to English</option>
  25     <option value="pt|en">Portuguese to English</option>
  26     <option value="ja|en">Japanese to English BETA</option>
  27     <option value="ko|en">Korean to English BETA</option>
  28     <option value="zh-CN|en">Chinese&nbsp;(Simplified) to English BETA</option>
  29 </select>
  30 <input type=hidden name=hl value=en>
  31 <input type=hidden name=ie value="UTF8">
  32 <input type=submit value="Translate"></form>
  33 """
  34 
  35 def execute(pagename, request):
  36     page = Page(request, pagename)
  37     actname = __name__.split('.')[-1]
  38 
  39     if actname in request.cfg.actions_excluded \
  40             or not request.user.may.write(pagename) \
  41             or not request.user.may.delete(pagename):
  42         return page.send_page(request,
  43             msg=_('You are not allowed to translate this page'))
  44 
  45     url=request.url.split('?')[0]
  46 
  47     return page.send_page(request,
  48             msg=template%url)

GoogleTranslate (last edited 2011-08-03 11:01:08 by localhost)

web biohackers.net