public class TranslateExample extends Object
This example demonstrates a simple/typical Translate usage.
See the README for compilation instructions. Run this code with
target/appassembler/bin/TranslateExample
-Dexec.args="<apiKey> [<targetLanguage>]
list languages <languageCode>?
detect <text>+
translate <text>+"
The first parameter is an optional targetLanguage. If the target language is not
supplied, en is used (see TranslateOptions.Builder#targetLanguage(String)).
| Constructor and Description |
|---|
TranslateExample() |
Copyright © 2016 Google. All rights reserved.