code: def translate(to_translate, to_language="auto", from_language="auto"):
      
      base_link = "http://translate.google.com/m?hl=%s&sl=%s&q=%s"
      if (sys.version_info[0] < 3):
          to_translate = urllib.quote_plus(to_translate)
          link = base_link % (to_language, from_language, to_translate)
          request = urllib2.Request(link, headers=agent)
          raw_data = urllib2.urlopen(request).read()
      else:
          to_translate = urllib.parse.quote(to_translate)
          link = base_link % (to_language, from_language, to_translate)
          request = urllib.request.Request(link, headers=agent)
          raw_data = urllib.request.urlopen(request).read()
      data = raw_data.decode("utf-8")
      expr = r'class="t0">(.*?)<'
      re_result = re.findall(expr, data)
      if (len(re_result) == 0):
          result = ""
      else:
          result = unescape(re_result[0])
      return (result)
docs: Returns the translation using google translate
      you must shortcut the language you define
      (French = fr, English = en, Spanish = es, etc...)
      if not defined it will detect it or use english by default
  
      Example:
      print(translate("salut tu vas bien?", "en"))
      hello you alright?