JavaScript-visible API for a translation session bound to a specific language pair.
Readonly
BCP-47 identifier of the source language (e.g. "en").
"en"
BCP-47 identifier of the target language (e.g. "fr").
"fr"
Translate a string from the session's source language to its target language.
The text to translate.
A Promise resolving to the translated string, or rejecting with an error message if translation fails.
JavaScript-visible API for a translation session bound to a specific language pair.