{"id":22477,"library":"translators","title":"Translators","description":"A Python library for free, multiple, and enjoyable translations. Version 6.0.4 supports over 50 translation services including Google, Bing, DeepL, and Yandex. Active development with frequent updates.","status":"active","version":"6.0.4","language":"python","source_language":"en","source_url":"https://github.com/UlionTse/translators","tags":["translation","text","nlp","api"],"install":[{"cmd":"pip install translators","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Use 'import translators as ts' to avoid name conflicts and access all functions.","wrong":"from translators import *","symbol":"translators","correct":"import translators as ts"}],"quickstart":{"code":"import translators as ts\n\n# Translate text from English to Chinese\ntranslation = ts.translate_text('Hello, world!', translator='google', from_language='en', to_language='zh')\nprint(translation)\n\n# List available translators\nprint(ts.translators_pool())","lang":"python","description":"Basic usage: translate text with a specified service and language codes."},"warnings":[{"fix":"Update function calls to use new parameter names: translator, from_language, to_language.","message":"In version 6.0, the function signature changed: 'translator' parameter renamed from 'translator' (was 'engine' in v5). Also 'from_language' and 'to_language' replaced 'from_lang' and 'to_lang'.","severity":"breaking","affected_versions":"<6.0"},{"fix":"Add time.sleep(1) between requests or use a rotating proxy list.","message":"Some translators (e.g., Google) may rate-limit or block requests. Use sleep delays or proxies to avoid issues.","severity":"gotcha","affected_versions":"all"},{"fix":"Verify language support before translating.","message":"Not all translators support all language pairs. Check supported languages with ts.get_languages(translator_name).","severity":"gotcha","affected_versions":"all"},{"fix":"Use time.sleep() instead.","message":"The 'translators' parameter 'sleep_seconds' is deprecated in favor of setting delays manually.","severity":"deprecated","affected_versions":">=6.0"}],"env_vars":null,"search_vec":"'50':15 '6.0.4':12 'activ':24 'api':32 'bing':20 'deepl':21 'develop':25 'enjoy':9 'free':6 'frequent':27 'googl':19 'includ':18 'librari':4 'multipl':7 'nlp':31 'python':3 'servic':17 'support':13 'text':30 'translat':1,10,16,29 'updat':28 'version':11 'yandex':23","created_at":"2026-04-27T17:05:23.206487+00:00","updated_at":"2026-04-27T17:05:23.206487+00:00","problems":[{"fix":"Check the translator name and language codes; use try/except to handle failures.","cause":"The translation failed due to an unsupported language pair or service unavailability.","error":"KeyError: 'translation'"},{"fix":"Run 'pip install translators' in your terminal or environment.","cause":"The library is not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'translators'"},{"fix":"Replace 'engine=' with 'translator=' and 'from_lang=' with 'from_language=', 'to_lang=' with 'to_language='.","cause":"Using old parameter name 'engine' which was renamed to 'translator' in v6.","error":"TypeError: translate_text() got an unexpected keyword argument 'engine'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"6.0.4","cli_name":"translators","cli_version":"sh: 1: translators: not found","type":"library","homepage":null,"github":"https://github.com/UlionTse/translators","docs":"https://github.com/UlionTse/translators/blob/master/README.md","changelog":"https://github.com/UlionTse/translators/blob/master/change_log.md","pypi":"https://pypi.org/project/translators/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["llm-agents","http-networking","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-29","install_tag":null}}