Language Translate

Version: 1.0.1
language/translate
superface

Translations from one to another language

Translate text usecase

Translate text to another language

Text
Target language
Source language
Text
Source language

1. Install

npx @superfaceai/cli install language/translate

2. Use in your code

const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the installed profile
  const profile = await sdk.getProfile('language/translate');

  // Use the profile
  const result = await profile
    .getUseCase('TranslateText')
    .perform({
      text: 'Enjoy your stay.',
      targetLanguage: 'ES'
    });

  return result.unwrap();
}

run();

3. Add providers