Menu
Docs
Feedback
Login
You are viewing a section of Superface that will be
deprecated in Q4 2023
. Until then, you can continue to use it as you have before but we recommend that you migrate to our latest version soon. For more details visit
superface.ai/docs/migrate
.
Language Translate
language/translate@1.0.2
1 provider
Translate text usecase
TranslateText
Translate text to another language
Input
Text
Target language
Source language
Result
Text
Source language
Integrate
1.
Choose a provider
Mock implementation
deepl
Request a missing provider
2.
Use
TranslateText
with
mock
in your code
Below instructions are for our Node.js SDK.
Use OneService for other languages.
npm
i
@superfaceai/one-sdk
Copy
Copied!
Copy
Copied!
Structure details
Input (object)
text
optional
string
targetLanguage
optional
Language that specified text is translated into
enum
BG
CS
DA
DE
EL
EN-GB
EN-US
EN
ES
ET
FI
FR
HU
IT
JA
LT
LV
NL
PL
PT-PT
PT-BR
PT
RO
RU
SK
SL
SV
ZH
sourceLanguage
optional
Language of specified text
enum
BG
CS
DA
DE
EL
EN
ES
ET
FI
FR
HU
IT
JA
LT
LV
NL
PL
PT
RO
RU
SK
SL
SV
ZH
Example
Copy
Copied!
Result (object)
text
optional
string
sourceLanguage
optional
Language of specified text
enum
BG
CS
DA
DE
EL
EN
ES
ET
FI
FR
HU
IT
JA
LT
LV
NL
PL
PT
RO
RU
SK
SL
SV
ZH
Example
Copy
Copied!
Implementation details
Provider
mock
Use case
TranslateText
Author
@superface
Source
View source
Verified