27

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.

D.R.
  • 20,268
  • 21
  • 102
  • 205

6 Answers6

21

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

LANGUAGE=de google-chrome
user247702
  • 23,641
  • 15
  • 110
  • 157
propcoder
  • 318
  • 2
  • 5
  • I'm using ubuntu, does't seems to work because after the chrome is launched, I open the console and write `navigator.language` which outputs another lg – Emidomenge Apr 26 '22 at 09:58
11

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

Konrad Dzwinel
  • 36,825
  • 12
  • 98
  • 105
  • 1
    Have you tried that? Browser is still English, and `Accept-Language` is still `en-US;en` – D.R. Jul 28 '14 at 11:21
  • @D.R. `chrome.exe --lang=de` works just fine on windows 8, just tested. `DE` vs `de` issue? – Konrad Dzwinel Jul 28 '14 at 11:28
  • I've tried `de` now, still does not work. It is only changing the UI language - I'm on Win 8.1 and Chrome 36.x. Are you sure the Accept-Language has changed? – D.R. Jul 28 '14 at 12:02
  • @D.R. You are right, interface language is german and google login-to-browser page is also german, but `Accept-Language` is still the default one: https://imgur.com/5Y3GI8m . If you believe this is a bug, please report it: http://crbug.com. – Konrad Dzwinel Jul 28 '14 at 12:18
  • @D.R. Have you seen [this question](https://stackoverflow.com/questions/7769061/how-to-add-custom-accept-languages-to-chrome-for-pseudolocalization-testing) or [this one](https://superuser.com/questions/478565/chrome-extension-for-switching-locale-accept-languages) ? – Konrad Dzwinel Jul 28 '14 at 12:23
8

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
Alexander O'Mara
  • 58,688
  • 18
  • 163
  • 171
  • maybe because your first locale `en-US` is not working and you should try it with `--lang=en_US`. In the docs they also use a an underscore. – Daniel Eisenreich Apr 08 '20 at 11:59
2

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.

Daniel Eisenreich
  • 1,353
  • 3
  • 16
  • 32
2

For latest chrome versions below command should work.

path_to_chrome.exe --accept-lang=en-GB

Need to follow protocol language[-country]. Refer https://peter.sh/experiments/chromium-command-line-switches/#accept-lang

Can even give multiple languages using comma as delimeter.

path_to_chrome.exe --accept-lang=en-GB,en-US

Note: If you have chrome already open it'll open new window in same session and hence changes you might not see locales reflecting. Either close existing sessions else use --user-data-dir=/path (refer) to start an isolated session.

1

I know this is a very old post but I was searching for a solution to define language for chrome without even starting it or update the exe shortcut.

It is possible to force a language and a locale for chrome with the registry on windows.

You need 2 keys to be changed WITH ADMIN RIGHTS :

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Policies\Google\Chrome]
"ApplicationLocaleValue"="fr"
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Policies\Google\Chrome\ForcedLanguages]
"1"="fr-FR"

This is forcing the language so all users will not be able to update it with the Chorme UI.

If you need to force a language and be able to modify it with the UI, maybe there is a solution on the official Documentation linked below.

Official Documentation :

Best regards.

Loxnol
  • 21
  • 1