text.translation
translate text between languages online; cached translations work offline
Example results generated on 2026-10-08. Ones using
now,todayor randomness will differ when you run them: press Run on any example to run it in your browser, after editing it if you like.
translate
# allow_network_access() first; cached translations work without it
# languages by code (es, de, zh-CN) or English name (spanish, german, chinese)
# from is auto-detected when left out
Functions
| function | description |
|---|---|
translate(text: str, to: str, from?: str) | translate text into another language by code or English name; the source is detected when omitted |
translate
translate(text: str, to: str, from?: str): translate text into another language by code or English name; the source is detected when omitted
"good morning".translate("es")
translate("Guten Morgen", "english", "german")
See also: allow_network_access