Skip to content

Commit a723075

Browse files
Update READMEs
1 parent a0bbd90 commit a723075

2 files changed

Lines changed: 38 additions & 38 deletions

File tree

README.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ This client supports the following Google Cloud Platform services at a [GA](#ver
1616
- [Stackdriver Logging](#stackdriver-logging-ga) (GA)
1717
- [Cloud Datastore](#google-cloud-datastore-ga) (GA)
1818
- [Cloud Storage](#google-cloud-storage-ga) (GA)
19+
- [Cloud Translation](#google-translation-ga) (GA)
1920

2021
This client supports the following Google Cloud Platform services at a [Beta](#versioning) quality level:
2122

2223
- [BigQuery](#google-cloud-bigquery-beta) (Beta)
2324
- [Cloud Pub/Sub](#google-cloud-pubsub-beta) (Beta)
2425
- [Cloud Spanner](#cloud-spanner-beta) (Beta)
25-
- [Cloud Translation](#google-translation-beta) (Beta)
2626
- [Cloud Natural Language](#google-cloud-language-beta) (Beta)
2727
- [Cloud Vision](#google-cloud-vision-beta) (Beta)
2828

@@ -368,6 +368,40 @@ if (blob != null) {
368368
}
369369
```
370370
371+
Google Translation (GA)
372+
----------------
373+
374+
- [API Documentation][translate-api]
375+
- [Official Documentation][translate-docs]
376+
377+
#### Preview
378+
379+
Here's a snippet showing a simple usage example. The example shows how to detect the language of
380+
some text and how to translate some text. The example assumes that either Application Default
381+
Credentials or a valid API key are available. An API key stored in the `GOOGLE_API_KEY` environment
382+
variable will be automatically detected. Complete source code can be found at
383+
[DetectLanguageAndTranslate.java](./google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/DetectLanguageAndTranslate.java).
384+
385+
```java
386+
import com.google.cloud.translate.Detection;
387+
import com.google.cloud.translate.Translate;
388+
import com.google.cloud.translate.Translate.TranslateOption;
389+
import com.google.cloud.translate.TranslateOptions;
390+
import com.google.cloud.translate.Translation;
391+
392+
Translate translate = TranslateOptions.getDefaultInstance().getService();
393+
394+
Detection detection = translate.detect("Hola");
395+
String detectedLanguage = detection.getLanguage();
396+
397+
Translation translation = translate.translate(
398+
"World",
399+
TranslateOption.sourceLanguage("en"),
400+
TranslateOption.targetLanguage(detectedLanguage));
401+
402+
System.out.printf("Hola %s%n", translation.getTranslatedText());
403+
```
404+
371405
Google Cloud BigQuery (Beta)
372406
----------------------
373407
@@ -742,40 +776,6 @@ while (projectIterator.hasNext()) {
742776
}
743777
```
744778
745-
Google Translation (Beta)
746-
----------------
747-
748-
- [API Documentation][translate-api]
749-
- [Official Documentation][translate-docs]
750-
751-
#### Preview
752-
753-
Here's a snippet showing a simple usage example. The example shows how to detect the language of
754-
some text and how to translate some text. The example assumes that either Application Default
755-
Credentials or a valid API key are available. An API key stored in the `GOOGLE_API_KEY` environment
756-
variable will be automatically detected. Complete source code can be found at
757-
[DetectLanguageAndTranslate.java](./google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/DetectLanguageAndTranslate.java).
758-
759-
```java
760-
import com.google.cloud.translate.Detection;
761-
import com.google.cloud.translate.Translate;
762-
import com.google.cloud.translate.Translate.TranslateOption;
763-
import com.google.cloud.translate.TranslateOptions;
764-
import com.google.cloud.translate.Translation;
765-
766-
Translate translate = TranslateOptions.getDefaultInstance().getService();
767-
768-
Detection detection = translate.detect("Hola");
769-
String detectedLanguage = detection.getLanguage();
770-
771-
Translation translation = translate.translate(
772-
"World",
773-
TranslateOption.sourceLanguage("en"),
774-
TranslateOption.targetLanguage(detectedLanguage));
775-
776-
System.out.printf("Hola %s%n", translation.getTranslatedText());
777-
```
778-
779779
Google Cloud Speech (Alpha)
780780
----------------
781781

google-cloud-translate/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
2222
<dependency>
2323
<groupId>com.google.cloud</groupId>
2424
<artifactId>google-cloud-translate</artifactId>
25-
<version>0.20.2-beta</version>
25+
<version>1.2.2</version>
2626
</dependency>
2727
```
2828
If you are using Gradle, add this to your dependencies
2929
```Groovy
30-
compile 'com.google.cloud:google-cloud-translate:0.20.2-beta'
30+
compile 'com.google.cloud:google-cloud-translate:1.2.2'
3131
```
3232
If you are using SBT, add this to your dependencies
3333
```Scala
34-
libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "0.20.2-beta"
34+
libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "1.2.2"
3535
```
3636

3737
Example Application

0 commit comments

Comments
 (0)