Syntax
Arguments
input: A VARCHAR expression containing the text to translate.source_language: A VARCHAR expression specifying the source language. Use an empty string''to request automatic detection.target_language: A VARCHAR expression specifying the target language.
en, zh, or fr, or a language name the model recognizes. Available languages depend on the model. The database has no fixed language list.
For the types and default behavior of provider and model, see Common calling rules.
Return value
Returns the translated text as a nullable VARCHAR. Ifinput evaluates to NULL, the function returns NULL. If source_language evaluates to NULL, the model detects the source language. If target_language evaluates to NULL, an empty string, or a string containing only ASCII whitespace, the function returns NULL without sending a request.
All three semantic arguments are required and cannot be bare NULL literals. To detect the source language automatically, explicitly pass an empty string.