How can I launch Puppeteer with the browser set to Spanish?

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();
})();

hey, i tried using --lang=es instead and updating puppeteer. make sure you set correct headers too, it helped me launch in spanish. hope it works for u.