GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — java-sdk/language-translator at master · Java-CDS-club/java-sdk

Expand file tree

/

language-translator

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

language-translator

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src
src
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

README.md

Outline

Language Translator

Installation

Maven
<dependency>
  <groupId>com.ibm.watson</groupId>
  <artifactId>language-translator</artifactId>
  <version>10.1.0</version>
</dependency>
Gradle
'com.ibm.watson:language-translator:10.1.0'

Usage

Select a domain, then identify or select the language of text, and then translate the text from one supported language to another.
Example: Translate 'hello' from English to Spanish using the Language Translator service.

Authenticator authenticator = new IamAuthenticator("<iam_api_key>");
LanguageTranslator service = new LanguageTranslator("2018-05-01", authenticator);

TranslateOptions translateOptions = new TranslateOptions.Builder()
  .addText("hello")
  .source(Language.ENGLISH)
  .target(Language.SPANISH)
  .build();
TranslationResult translationResult = service.translate(translateOptions).execute().getResult();

System.out.println(translationResult);
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.