Permalink
Browse files

0.97-SNAPSHOT and upated README.

  • Loading branch information...
1 parent 7ab4f83 commit 6a501e64b4c6220c51f12dd547ebf8db60929d87 @richmidwinter committed Nov 5, 2011
Showing with 7 additions and 3 deletions.
  1. +6 −2 README
  2. +1 −1 pom.xml
View
@@ -18,9 +18,13 @@ import com.google.api.translate.Translate;
public class Main {
public static void main(String[] args) throws Exception {
// Set the HTTP referrer to your website address.
- Translate.setHttpReferrer(/* Enter the URL of your site here */);
+ GoogleAPI.setHttpReferrer(/* Enter the URL of your site here */);
- String translatedText = Translate.execute("Bonjour le monde", Language.FRENCH, Language.ENGLISH);
+ // Set the Google Translate API key
+ // See: http://code.google.com/apis/language/translate/v2/getting_started.html
+ GoogleAPI.setKey(/* Enter your API key here */);
+
+ String translatedText = Translate.DEFAULT.execute("Bonjour le monde", Language.FRENCH, Language.ENGLISH);
System.out.println(translatedText);
}
View
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api</groupId>
<artifactId>google-api-translate-java</artifactId>
- <version>0.96-SNAPSHOT</version>
+ <version>0.97-SNAPSHOT</version>
<name>google-api-translate-java</name>
<description>A Java wrapper for the Google Translate service</description>
<packaging>jar</packaging>

0 comments on commit 6a501e6

Please sign in to comment.