title: Chromedriver: How to translate a page using selenium?
body: <p>I need to translate a page from Japanese to English, using selenium in chrome browser. I tried different ways one of sample code snippet is as following</p>
  
  <pre><code>import java.util.concurrent.TimeUnit;
  import org.junit.Test;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.chrome.ChromeDriver;
  import org.openqa.selenium.chrome.ChromeOptions;
  import org.openqa.selenium.remote.DesiredCapabilities;
  public class Main {
  
      private WebDriver driver=null;
      WebDriverLoad a;
  
      @Test
      public void successfulDesignerLogin() throws Exception{
  //      final DesiredCapabilities capabilities = DesiredCapabilities.chrome();
  //        capabilities.setJavascriptEnabled(true);
          String chromedriver =  "/dev/Saved/chromedriver";
          System.setProperty("webdriver.chrome.driver",chromedriver);
  
          ChromeOptions options = new ChromeOptions();
          options.addArguments("--lang=en-ca");
          //Map&lt;String, Object&gt; prefs = new HashMap&lt;String, Object&gt;();
          //prefs.put("intl.accept_languages", "en,en_US");
          //options.setExperimentalOption("prefs", prefs);
  
  
         ChromeDriver driver = new ChromeDriver(options);
         driver.manage().timeouts().implicitlyWait(4, TimeUnit.SECONDS);
         driver.get("https://www.bbc.com/japanese");
         driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
         driver.close();
  
  
  }
  }
  </code></pre>
  
  <p>I tried a couple of solution <code>options.addArguments</code> <code>options.setExperimentalOption</code> but nothing works can any one suggests me what can be the solution</p>