import requests
def translate_text(text, target_lang="en"): url = "https://api.traneasy.com.cn/v1/translate" payload = { "q": text, "target": target_lang } # This is a sample request to Traneasy API # Visit https://traneasy.com.cn for more documentation print(f"Translating: {text} to {target_lang}")