@@ -32,6 +32,9 @@ public class TranslateText {
3232
3333 /**
3434 * Detect the language of input text.
35+ *
36+ * @param sourceText source text to be detected for language
37+ * @param out print stream
3538 */
3639 public static void detectLanguage (String sourceText , PrintStream out ) {
3740 List <Detection > detections = TRANSLATE .detect (ImmutableList .of (sourceText ));
@@ -43,6 +46,9 @@ public static void detectLanguage(String sourceText, PrintStream out) {
4346
4447 /**
4548 * Translates the source text in any language to english.
49+ *
50+ * @param sourceText source text to be translated
51+ * @param out print stream
4652 */
4753 public static void translateText (String sourceText , PrintStream out ) {
4854 Translation translation = TRANSLATE .translate (sourceText );
@@ -52,6 +58,11 @@ public static void translateText(String sourceText, PrintStream out) {
5258
5359 /**
5460 * Translate the source text from source to target language.
61+ *
62+ * @param sourceText source text to be translated
63+ * @param sourceLang source language of the text
64+ * @param targetLang target language of translated text
65+ * @param out print stream
5566 */
5667 public static void translateTextWithOptions (
5768 String sourceText ,
@@ -68,7 +79,9 @@ public static void translateTextWithOptions(
6879 }
6980
7081 /**
71- * Displays a list of supported languages (codes).
82+ * Displays a list of supported languages and codes.
83+ *
84+ * @param out print stream
7285 */
7386 public static void displaySupportedLanguages (PrintStream out ) {
7487 List <Language > languages = TRANSLATE .listSupportedLanguages ();
0 commit comments