--accept-lang
What does --accept-lang do?
----------------------------------------------------------------------------- Can't find the switch you are looking for? Try looking in: ash/constants/ash_switches.cc base/base_switches.cc etc. When commenting your switch, please use the same voice as surrounding comments. Imagine "This switch..." at the beginning of the phrase, and it'll all work out. ----------------------------------------------------------------------------- Specifies Accept-Language to send to servers and expose to JavaScript via the navigator.language DOM property. language[-country] where language is the 2 letter code from ISO-639.
Usage
CLILaunch Chrome with --accept-lang using CLI
chrome --accept-langPuppeteerLaunch Chrome with --accept-lang using Puppeteer
const browser = await puppeteer.launch({
args: ['--accept-lang']
});PlaywrightLaunch Chrome with --accept-lang using Playwright
const browser = await chromium.launch({
args: ['--accept-lang']
});SeleniumLaunch Chrome with --accept-lang using Selenium
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--accept-lang')
driver = webdriver.Chrome(options=options)