Set Chromium to always automatically translate all languages

4

1

Is there any way to set Chromium to always automatically translate websites in all languages so I don't have to do "Always translate websites in LANGUAGE" every time I come across a website in a new language? I am on Mac OS X.

Wuffers

Posted 2010-11-02T02:06:41.563

Reputation: 16 645

Answers

6

This is an old question, but it kept coming up when I was searching for how to do this, and I finally figured out how.

I modified the preferences file to add every language to Chrome's translation whitelist, which is the preference that choosing "always translate" changes. Here's the steps to do it:

  1. Close Chrome, if it's running. I'm not sure it tolerates monkeying with the preferences file while it's running.
  2. Find the translate_language_list.cc file in the Chromium sources. You can just grab it from the Web.
  3. Copy the contents of the kDefaultSupportedLanguages array into your favorite text editor with a decent search-replace function.
  4. Use the editor to replace the comma and everything after it on each line with : "en", (assuming you're wanting to always translate to English). You can use your preferences file as an example (see next step) if there's any confusion on the format.
  5. Find your Chrome preferences file (mine's at ~/.config/google-chrome/Default/Preferences, on Linux) and replace the contents of the translate_whitelists array (it's near the bottom, in mine) with what we've just generated, save, and (re)start Chrome.

I also changed the translate_accepted_count array in the preferences file to have a positive number for each language, but I don't think it's necessary.

AlliedEnvy

Posted 2010-11-02T02:06:41.563

Reputation: 161

1

Grab the Google Translate Extension. Head over to Chrome Menu → Tools → Extensions → Google Translate options and put a check mark against "Always translate".

alt text

Sathyajith Bhat

Posted 2010-11-02T02:06:41.563

Reputation: 58 436

When I go to the configuration for the extension, I get an error stating that the extension only works for Windows. I am on Mac OS X. – Wuffers – 2010-11-02T21:35:50.300

This worked for me without issue. – Sam I am says Reinstate Monica – 2019-08-13T02:13:11.943