Rev | Line | |
---|
[14] | 1 | import com.google.api.translate.Language; |
---|
| 2 | import com.google.api.translate.Translate; |
---|
| 3 | |
---|
| 4 | public class GTranslate { |
---|
| 5 | |
---|
| 6 | public static void main(String[] args) { |
---|
| 7 | |
---|
| 8 | try { |
---|
| 9 | //String translatedText = Translate.translate("Salut le monde", Language.FRENCH, Language.ENGLISH); |
---|
| 10 | String translatedText = Translate.translate("Hello World!!", Language.ENGLISH, Language.FRENCH); |
---|
| 11 | System.out.println(translatedText); |
---|
| 12 | |
---|
| 13 | } catch (Exception ex) { |
---|
| 14 | ex.printStackTrace(); |
---|
| 15 | } |
---|
| 16 | } |
---|
| 17 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.