powered by
Detect the language of text within a request
gl_translate_detect(string)
A tibble of the detected languages with columns confidence, isReliable, language, and text, of length equal to the vector of text you passed in.
confidence
isReliable
language
text
Character vector of text to detect language for
Consider using library(cld2) and cld2::detect_language instead for offline detection, since that is free and does not require an API call.
library(cld2)
cld2::detect_language
gl_translate also returns a detection of the language, so you could optionally use that in one step.
https://cloud.google.com/translate/docs/reference/detect
Other translations: gl_translate(), gl_translate_document(), gl_translate_languages()
gl_translate()
gl_translate_document()
gl_translate_languages()
if (FALSE) { gl_translate_detect("katten sidder på måtten") }
Run the code above in your browser using DataLab