Type Parameters
-
T extends ("id" | "th" | "tt" | "mn" | "ms" | "so" | "en" | "fr" | "de" | "es" | "it" | "pt" | "ru" | "ja" | "ko" | "zh" | "ar" | "hi" | "bn" | "pa" | "te" | "mr" | "ta" | "ur" | "gu" | "kn" | "ml" | "sd" | "or" | "as" | "bh" | "ks" | "ne" | "si" | "sa" | "my" | "km" | "lo" | "vi" | "tl" | "jv" | "su" | "ceb" | "ny" | "ha" | "yo" | "ig" | "zu" | "xh" | "st" | "tn" | "sn" | "rw" | "rn" | "lg" | "sw" | "mg" | "eo" | "cy" | "eu" | "gl" | "ca" | "ast" | "qu" | "ay" | "gn" | "ug" | "dz" | "bo" | "ii" | "chr" | "iu" | "oj" | "cr" | "yi" | "he" | "fa" | "ps")[]
Parameters
-
text: string
-
Rest
...toLanguages: T
Returns Promise<undefined | MatchingOutput<T>>
An object where each key is a language code and the corresponding value is the translation of the text into that language.
Example function that translates a given text into the specified languages.