Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start Google Chrome with a specific locale (using a command line argument)

How to start Google Chrome with a specific locale using command line arguments?

According to http://peter.sh/experiments/chromium-command-line-switches/

chrome.exe --lang DE

should work, however, it does not.

like image 844
D.R. Avatar asked Jul 28 '14 09:07

D.R.


People also ask

How do I run command line arguments in Chrome?

Just right-click the shortcut, locate Google Chrome there, right-click on it and select Properties. The Shortcut tab should open up automatically. It displays the load path of the browser in the target field. At the end of the field, after the closing ", add a space, and then the command line switch you want to use.

How do I open Chrome from command line?

Open Chrome Using Command Prompt You can also do the same thing from the “Run” window. Open Run by typing “Run” in the Windows 10 search bar and selecting the “Run” application. Here, type Chrome and then select the “OK” button. The web browser will now open.


4 Answers

Other suggestions does not work in Debian Jessie. What works for me is:

LANGUAGE=de google-chrome
like image 126
propcoder Avatar answered Sep 30 '22 04:09

propcoder


In my case anyway, I had to specify both en-US and en to get everything setup correctly.

This was my command-line argument:

--lang=en-US,en

UPDATE: You might also try:

--lang=en_US
like image 21
Alexander O'Mara Avatar answered Sep 30 '22 05:09

Alexander O'Mara


path_to_chrome.exe --lang=locale (notice the = sign)

Comprehensive instricution on how to set your browser's locale: https://developer.chrome.com/extensions/i18n#locales-testing

List of supported locales: https://developer.chrome.com/webstore/i18n#localeTable

like image 8
Konrad Dzwinel Avatar answered Sep 30 '22 06:09

Konrad Dzwinel


On Windows, it's just working with

chrome.exe --lang=en_US

Important: You need to close all other chrome windows! Otherwise the locale of the current opened chrome process will be taken.

Alternative: Is to choose a different user-data-dir. With --user-data-dir=tmp you can keep your chrome open.

like image 2
Daniel Eisenreich Avatar answered Sep 30 '22 04:09

Daniel Eisenreich