ModuleTranslate.py 215 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #!/usr/bin/python # -*- coding: utf-8 -*- from Tradutor import * tradutor = Tradutor() def iniciar(x): try: text = x.decode("utf-8") except: text = x.decode("iso-8859-1") return tradutor.traduzir(text)