def get_translations(source,engine,sourcelang,targetlang):
    params = {
        'api_key': API_KEY.encode('utf-8'),
        'source': sourcelang.encode('utf-8'),
	'target': targetlang.encode('utf-8'),
	'engine':engine.encode('utf-8'),
        'q': source.encode('utf-8')
    }
    url = API_URL + urlencode(params)
    
    response = request.urlopen(url)
    response = json.loads(response.read().decode('utf-8'))
    if not response['success']:
        # Gwall gyda'r galwad API
        # something went wrong with the API call
        translations = u'\n'.join(response['translations'])
        raise ValueError(translations)
    
    return response['translations']
This hook is called after the command has finished executing
dataset/ETHPy150Open PorthTechnolegauIaith/moses-smt/tut/demo1.py/get_translations--crossover with--dataset/ETHPy150Open evennia/evennia/evennia/commands/command.py/Command.at_post_cmd