title: Facing issue converting web pages in different language to English with selenium webdriver
body: <p>I have different links in different language which I want to convert it to English with Selenium JAVA after page is loaded. This option works manually by right clicking on page and selecting option translate to English after page is loaded. I am looking for a solution to do this with selenium JAVA on Chrome. I already referred below links but not able to get any working solution -</p>
  <ul>
  <li><a href="https://stackoverflow.com/questions/54042910/how-can-i-translate-the-webpage-opened-via-selenium-webdriver-to-english-using-p">How can I translate the webpage opened via Selenium Webdriver to English using Python?</a></li>
  <li><a href="https://stackoverflow.com/questions/53717431/chromedriver-how-to-translate-a-page-using-selenium">Chromedriver: How to translate a page using selenium?</a></li>
  <li><a href="https://chat.stackoverflow.com/rooms/185111/discussion-between-kumrun-nahar-keya-and-ewwink">https://chat.stackoverflow.com/rooms/185111/discussion-between-kumrun-nahar-keya-and-ewwink</a></li>
  <li><a href="https://www.listendata.com/2020/10/translating-web-page-while-scraping.html" rel="nofollow noreferrer">https://www.listendata.com/2020/10/translating-web-page-while-scraping.html</a></li>
  <li><a href="https://stackoverflow.com/questions/24756758/how-can-we-test-a-web-application-in-different-languagenot-english-using-selen">How can we test a web application in different language(not english) using selenium webdriver in Java</a></li>
  <li><a href="https://stackoverflow.com/questions/63148114/convert-web-page-from-swedish-to-english-in-python-selenium">Convert Web Page from Swedish to English in Python Selenium</a></li>
  </ul>
  <p>I am using these sample URLs -</p>
  <ul>
  <li><a href="https://www.bbc.com/japanese" rel="nofollow noreferrer">https://www.bbc.com/japanese</a></li>
  <li><a href="https://www.indeed.com.mx/" rel="nofollow noreferrer">https://www.indeed.com.mx/</a></li>
  </ul>
  <p>The code I used was -</p>
  <pre><code>System.setProperty(&quot;webdriver.chrome.driver&quot;, &quot;src/main/resources/chromedriver.exe&quot;);
  ChromeOptions options = new ChromeOptions();
  Map&lt;String, Object&gt; prefs = new HashMap&lt;String, Object&gt;();
  prefs.put(&quot;translate&quot;, &quot;{'enabled':'true'}&quot;);
  prefs.put(&quot;translate_whitelists&quot;, &quot;{'ja':'en'}&quot;);
  options.setExperimentalOption(&quot;prefs&quot;, prefs);
  WebDriver driver = new ChromeDriver(options);
  driver.get(&quot;https://www.bbc.com/japanese&quot;);
  </code></pre>
  <p>The version I am using is -</p>
  <p>Chrome version - 86
  Chrome driver exe - 86
  Selenium Java - 3.141.59</p>