title: Using Java Google Translate API
body: <p>I am trying to use the <a href="https://code.google.com/archive/p/java-google-translate-text-to-speech/" rel="nofollow noreferrer">Java Google Translate API</a>, but I am having a problem setting it up. I create a package called javafx_texttospeech and put the two jars (gtranslateapi-1.0.jar and jl1.0.jar) in that package. I then create a class named Translate. </p>
  
  <pre><code>package javafx_texttospeech;
  
  public class Translate{
      public static void main(String [] args){
          Translator translate = Translator.getInstance();
          String text = translate.translate("Hello!", Language.ENGLISH, Language.ROMANIAN);
          System.out.println(text);
      }
  }
  </code></pre>
  
  <p>For some reason, this is not working and the keywords Language, Translator, and translate are being highlighted in red and it says that it can't resolve the symbols. What am I doing wrong? What should I import?</p>
  
  <p><a href="https://i.stack.imgur.com/O3eV4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O3eV4.png" alt=""></a></p>
  
  <p>File structure:</p>
  
  <p><a href="https://i.stack.imgur.com/UiGZo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UiGZo.png" alt=""></a></p>