Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Eh, Google is certainly a great translation service, but if you're looking for reliable translations you probably need to go human - machine translation can be sketchy at best. <a href="http://mygengo.com/" rel="nofollow">myGengo</a> has an API to facilitate machine translation; your question is tagged with "python", so I've thrown some sample code below, but you can <a href="http://venodesigns.net/2011/05/31/using-the-mygengo-translation-api-with-python/" rel="nofollow">get a more extensive walkthrough</a> if you so desire.</p> <p>The cool thing is that you can get a machine translation while you wait for your human translation to be done, so if you need <em>something</em> in the time between you're not high and dry. ;)</p> <p>First, install the mygengo API library for Python:</p> <pre><code>pip install mygengo </code></pre> <p>Then, request translations like below:</p> <pre><code># -*- coding: utf-8 -*- from mygengo import MyGengo gengo = MyGengo( public_key = 'your_mygengo_api_key', private_key = 'your_mygengo_private_key', sandbox = False, # possibly False, depending on your dev needs ) translation = gengo.postTranslationJob(job = { 'type': 'text', # REQUIRED. Type to translate, you'll probably always put 'text' here (for now ;) 'slug': 'Translating Chinese to English with the myGengo API', # REQUIRED. For storing on the myGengo side 'body_src': '我們今天要去那裏嗎', # REQUIRED. The text you're translating. ;P 'lc_src': 'zh', # REQUIRED. source_language_code (see getServiceLanguages() for a list of codes) 'lc_tgt': 'en', # REQUIRED. target_language_code (see getServiceLanguages() for a list of codes) 'tier': 'standard', # REQUIRED. tier type ("machine", "standard", "pro", or "ultra") }) # This will print out a machine translation; for your human translation, you can # poll and check often, or set up a URL for it to post the results to. print translation['response']['job']['body_tgt'] </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload