10.07.2015 Views

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example 13-13 Java code to call <strong>Web</strong>Sphere Translation Serverimport com.ibm.lt.*;public class phrase {public static void main(String args[]){LTinterface service=null;Object handle=null;String answer;if (args.length!=3) {System.out.println("Usage:");System.out.println(" phrase {hostname} {language} {sentence} ");System.out.println(" eg:\n");System.out.println(" phrase 127.0.0.1 enes \"The sky is blue.\" ");System.exit(0);}try {service = (LTinterface) LTengine.GetService(args[0],args[1]);}catch (Throwable t){t.printStackTrace();System.out.println("no service available");System.exit(0);}try{handle=service.jltBeginTranslation("*format=text");answer=service.jltTranslate(handle,"The sky is blue");System.out.println(answer);service.jltEndTranslation(handle);}catch (Exception e){e.printStackTrace();System.exit(0);}System.exit(0);}}For more information on how to use the <strong>IBM</strong> <strong>Web</strong>Sphere Translation Server JavaAPI please, refer to:http://www-3.ibm.com/software/pervasive/ws_translation_server/Attention: When searching for translation services for Sametime, you will findreferences to the <strong>Lotus</strong> Translation API or <strong>Lotus</strong> Translation Server forSametime. Please be aware that these products are no longer distributed orsupported.Chapter 13. Visioning scenario: Sametime enterprise integration 421

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!