Attempting to run Chrome in Spanish via Puppeteer fails using args, environment variables, and custom profiles. Tried code below with ‘–locale=es’:
const browserShell = require('puppeteer');
(async function initBrowser() {
const instance = await browserShell.launch({ args: ['--locale=es'] });
const pageInstance = await instance.newPage();
console.log(await pageInstance.evaluate(() => navigator.language));
await instance.close();
})();