Skip to content

Commit 769a28f

Browse files
jmdobrychingor13
authored andcommitted
samples: Add Storage quickstart sample.
1 parent 796c52e commit 769a28f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

translate/snippets/src/main/java/com/example/translate/QuickstartSample.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,17 @@ public class QuickstartSample {
2727
public static void main(String... args) throws Exception {
2828
// Instantiates a client
2929
Translate translate = TranslateOptions.builder().apiKey("YOUR_API_KEY").build().service();
30+
3031
// The text to translate
3132
String text = "Hello, world!";
33+
3234
// Translates some text into Russian
3335
Translation translation = translate.translate(
3436
text,
3537
TranslateOption.sourceLanguage("en"),
3638
TranslateOption.targetLanguage("ru")
3739
);
40+
3841
System.out.printf("Text: %s%n", text);
3942
System.out.printf("Translation: %s%n", translation.translatedText());
4043
}

0 commit comments

Comments
 (0)