Example of listing supported languages, localized according to - * {@link TranslateOptions#targetLanguage()}: + * {@link TranslateOptions#targetLanguage()}. *
{@code
* List languages = translate.listSupportedLanguages();
* }
- * Or according to another target language:
+ *
+ * Example of listing supported languages, localized according to a provided language. *
{@code
* List languages = translate.listSupportedLanguages(
* LanguageListOption.targetLanguage("es"));
* }
+ *
*/
ListExample of detecting the language of some texts: + *
Example of detecting the language of some texts. *
{@code
* List texts = new LinkedList<>();
* texts.add("Hello, World!");
@@ -123,7 +125,7 @@ public static TranslateOption targetLanguage(String targetLanguage) {
/**
* Detects the language of the provided texts.
*
- * Example of detecting the language of some texts:
+ *
Example of detecting the language of some texts.
*
{@code
* List detections = translate.detect("Hello, World!", "¡Hola Mundo!");
* }
@@ -138,17 +140,18 @@ public static TranslateOption targetLanguage(String targetLanguage) {
* Detects the language of the provided text. Returns an object containing information on the
* language detection.
*
- * Example of detecting the language a text:
+ *
Example of detecting the language of a text.
*
{@code
* Detection detection = translate.detect("Hello, World!");
* }
+ *
*/
Detection detect(String text);
/**
* Translates the provided texts.
*
- * Example of translating some texts:
+ *
Example of translating some texts.
*
{@code
* List texts = new LinkedList<>();
* texts.add("Hello, World!");
@@ -156,7 +159,7 @@ public static TranslateOption targetLanguage(String targetLanguage) {
* List translations = translate.translate(texts);
* }
*
- * Example of translating some texts, specifying source and target language:
+ *
Example of translating some texts, specifying source and target language.
*
{@code
* List texts = new LinkedList<>();
* texts.add("¡Hola Mundo!");
@@ -173,12 +176,12 @@ public static TranslateOption targetLanguage(String targetLanguage) {
/**
* Translates the provided texts.
*
- * Example of translating a text:
+ *
Example of translating a text.
*
{@code
* Translation translation = translate.translate("¡Hola Mundo!");
* }
*
- * Example of translating a text, specifying source and target language:
+ *
Example of translating a text, specifying source and target language.
*
{@code
* Translation translation = translate.translate("¡Hola Mundo!",
* TranslateOption.sourceLanguage("es"), TranslateOption.targetLanguage("de"));