public static void translateText(String sourceText,PrintStream out){
  Translate translate=createTranslateService();
  Translation translation=translate.translate(sourceText);
  out.printf("Source Text:\n\t%s\n",sourceText);
  out.printf("Translated Text:\n\t%s\n",translation.translatedText());
}

public static void translateText ( String sourceText , PrintStream out ) { Translate translate = createTranslateService ( ) ; Translation translation = translate . translate ( sourceText ) ; out . printf ( "Source Text:\n\t%s\n" , sourceText ) ; out . printf ( "Translated Text:\n\t%s\n" , translation . translatedText ( ) ) ; }
translates the source text in any language to english .
