logo of Screenshot for Web
Free toolsPlaygroundDocsBlogPricing
LoginDashboard

Company

HomeFeaturesPricingBlogFacts

Screenshot Tools

Website ScreenshotsFull Page ScreenshotsScrolling ScreenshotsWebsite HistoryPDF Generation APIScreenshot API

Legal

Terms of UsePrivacy PolicyCookie PolicyCopyrightSecurity

Support

FAQSupportContact UsAPI Status
screen shot for web logo

No clutter. No distractions. Just clean, full-page screenshots with smart customization.

© 2026 HYDRANODE LTD. All rights reserved.

Screenshot for Web is operated by HYDRANODE LTD, a company registered in England and Wales, company number 15672526. Registered office: 124 City Road, London, London, England, EC1V 2NX.

FacebookInstagramLinkedInYouTube
  1. Home
  2. Blog
  3. Guides

Screenshots in other languages and time zones: what each Puppeteer and Playwright setting changes

We tested every way to set a headless browser's language and time zone, then captured mozilla.org in five locales. Which setting changes what, measured.

Screenshot for Web·November 3, 2026·7 min read

Sources

  1. Playwright: Emulation (locale and timezone)
  2. Playwright: browser.newContext() options, locale and timezoneId
  3. Chrome DevTools Protocol: Emulation domain
  4. Puppeteer: Page.emulateTimezone()
  5. MDN: Accept-Language header
  6. MDN: Navigator.languages

How this article was made

Researched and drafted with AI assistance from the sources listed. On 3 November 2026 we ran every script in this article: Puppeteer 25.16.0 (Chrome for Testing 156.0.8078.47) and Playwright 1.64.1 (Chromium 156.0.8078.4) on macOS, and Debian 12's Chromium in Docker. The screenshots were made with those scripts. Our free screenshot tool was not answering that day, so it was not used.

Capture any page without ads, banners or chat widgets, free and without an account.

Try the free tools

More articles

  • News

    Puppeteer 25.19 stops print and dark mode emulation from cancelling each other

    Before Puppeteer 25.19.0, emulateMediaType and emulateMediaFeatures reset each other, losing print or dark mode. Our tests, the fix and a workaround.

    November 26, 2026
  • News

    Chrome 158 drops XSLT: what it does to screenshots of sitemaps and feeds

    We captured eight live sitemaps in Chrome 156 and Chromium 158. Styled pages turn into raw XML, a red warning bar is already in captures, and two fixes work.

    November 9, 2026
  • Research

    Chrome DevTools' full-size screenshot: where it fails on long and lazy pages

    We ran DevTools' full-size screenshot on six long pages: it stops at 16,384 pixels and misses content that appears on scroll. Here's why, and the fixes that worked.

    November 8, 2026

To screenshot a site the way a reader in Berlin or Tokyo sees it, a headless browser has to change three separate things. The first is the Accept-Language header the server reads. The second is navigator.language, which scripts read. The third is the locale and time zone that Intl uses to format dates, numbers and currencies. In Playwright, the locale and timezoneId context options set all three. In Puppeteer, no single setting does: we tested seven ways, and only a combination of two DevTools Protocol calls and page.emulateTimezone() changed everything. The usual launch flag, --lang, changed nothing in Chrome's current headless mode on macOS or on Linux.

This guide shows what we measured, the code that worked, and what changed when we captured one real site in five locales.

The three signals a page can read

A site can decide its language and formats in three places, and different sites use different ones:

SignalWho reads itWhat it decides
Accept-Language request headerThe serverWhich language version it sends or redirects to
navigator.language and navigator.languagesPage scriptsClient-side language pickers and translations
The Intl locale and the time zonetoLocaleString(), Intl.DateTimeFormat, Intl.NumberFormatDate order, decimal separators, currency position, clock time

MDN describes Accept-Language as a hint that browsers fill from the user's interface language, and says it generally lists the same locales as navigator.languages, with decreasing q values. MDN also notes that the header is often outside the user's control, for example when travelling. A screenshot test has to set the header and the scripts' view together, or the server and the page disagree.

How we tested

We wrote a small local page that prints every signal: navigator.language, navigator.languages, the Intl locale and time zone, a fixed moment (14:30 UTC on 3 November 2026) formatted with toLocaleString(), a number, a euro amount and Date.toString(). A local Node server logged the Accept-Language header of the page request and of a fetch() the page made. Then we opened the page with each setting on its own, aiming for German (de-DE) and Berlin time, on a Mac whose system locale is British English.

What each setting changed

Setting (Puppeteer unless stated)Headernavigator.languageIntl formatsTime zone
Nothing (defaults)en-GB,en;q=0.9en-GBen-GBEurope/London
--lang=de-DE launch flagunchangedunchangedunchangedunchanged
LANG=de_DE.UTF-8 environment variableunchangedunchangedunchangedunchanged
--accept-lang=de-DE,de launch flagde-DE,de;q=0.9de-DEunchangedunchanged
page.setExtraHTTPHeaders() with Accept-Languagede-DE,de;q=0.9unchangedunchangedunchanged
CDP Emulation.setUserAgentOverride with acceptLanguagede-DE,de;q=0.9de-DEunchangedunchanged
CDP Emulation.setLocaleOverride with de_DEunchangedunchangedde-DEunchanged
page.emulateTimezone("Europe/Berlin")unchangedunchangedunchangedEurope/Berlin
The last three togetherde-DE,de;q=0.9de-DEde-DEEurope/Berlin
Playwright locale: "de-DE", timezoneId: "Europe/Berlin"de-DEde-DEde-DEEurope/Berlin

Four results are worth knowing before you write a test:

  1. Setting a header is not enough. setExtraHTTPHeaders() changed what the server saw, on the page request and on the page's own fetch(), but scripts still read en-GB, and the euro amount still printed as €1,234.50. A page that localizes in JavaScript stays English.
  2. The locale override does not touch the network. Emulation.setLocaleOverride switched every Intl result to German (1.234.567,891, 1.234,50 €, 3.11.2026, 14:30:00) and even translated the time-zone name in Date.toString() to Mittlere Greenwich-Zeit. But the header and navigator.language stayed English. The protocol documentation marks this command as experimental.
  3. The time zone moves the clock, not the language. With only emulateTimezone(), the same moment printed as 15:30 with GMT+0100, still in British format.
  4. The native date picker ignored every override. The <input type="date"> on the probe page showed 03/11/2026, the Mac's own British format, in all eight captures we made, including Playwright's German one. Don't use form controls to check that a locale was applied.

Our probe page in headless Chrome. Left, only acceptLanguage set to de-DE: navigator.language is de-DE but Intl stays en-GB, London time, €1,234.50. Right, all three signals set: Intl de-DE, Europe/Berlin, 15:30, 1.234,50 €.

Why the --lang flag didn't work

Many older answers say to launch Chrome with --lang. In our tests it had no effect in Chrome's current headless mode, which Puppeteer uses by default, on either system:

  • macOS, Chrome for Testing 156: --lang=de-DE and LANG=de_DE.UTF-8 changed nothing. In the older chrome-headless-shell build (Puppeteer's headless: "shell"), --lang=de-DE did switch navigator.language and Intl to German, but the page request then carried no Accept-Language header at all.
  • Debian 12, Chromium 155 in Docker: nothing changed, because the image held a single locale file, en-US.pak. After we installed Debian's chromium-l10n package (440 files in Chromium's locales folder; the install also upgraded Chromium to 156.0.8078.73), LANG=de_DE.UTF-8 worked. It set the header to de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7 and navigator.language to de-DE. --lang still did nothing. The time zone stayed UTC, the container's own.

So a locale set through the environment depends on the operating system, the installed packages and the headless mode. The protocol calls below gave the same result on every setup we tried, so set the locale per page.

The Puppeteer recipe

This helper sets all three signals on one page. We ran it against mozilla.org with Japanese and Tokyo time:

import puppeteer from "puppeteer";

// Set all three locale signals on one page: the header, navigator and Intl, and the clock.
async function localize(page, { locale, timezoneId }) {
  const cdp = await page.createCDPSession();
  const language = locale.split("-")[0];
  await cdp.send("Emulation.setUserAgentOverride", {
    userAgent: await page.browser().userAgent(),
    acceptLanguage: `${locale},${language}`,
  });
  await cdp.send("Emulation.setLocaleOverride", { locale: locale.replace("-", "_") });
  await page.emulateTimezone(timezoneId);
}

const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({ width: 1280, height: 800 });
await localize(page, { locale: "ja-JP", timezoneId: "Asia/Tokyo" });
await page.goto("https://www.mozilla.org/", { waitUntil: "load" });
console.log(page.url());
console.log(await page.evaluate(() => [
  navigator.language,
  Intl.DateTimeFormat().resolvedOptions().locale,
  Intl.DateTimeFormat().resolvedOptions().timeZone,
  new Date(Date.UTC(2026, 10, 3, 14, 30)).toLocaleString(),
]));
await page.screenshot({ path: "recipe-ja-JP.png" });
await browser.close();

Output:

https://www.mozilla.org/ja/
[ 'ja-JP', 'ja-JP', 'Asia/Tokyo', '2026/11/3 23:30:00' ]

Call localize() before page.goto(), because the server reads the header on the first request. setLocaleOverride takes an ICU-style locale with an underscore (ja_JP), and emulateTimezone() takes an IANA name such as Asia/Tokyo. Puppeteer's documentation points to ICU's list of supported IDs.

The order matters for real sites, too. When we set only the Intl locale to German, mozilla.org redirected to /en-GB/. When we set only the header, it redirected to /de/. Mozilla picks the language on the server, from the header.

The Playwright recipe

Playwright's documentation says locale affects navigator.language, the Accept-Language header and number and date formatting, and timezoneId changes the context's time zone. Our probe confirmed all of it. One difference from Puppeteer: Playwright sent the bare tag, Accept-Language: de-DE, with no de fallback. A server that only knows de should still match it, but test that if your site has unusual language codes.

This is the script that captured the five versions of mozilla.org at the top of this article. A new context per locale keeps cookies from one language out of the next capture:

import { chromium } from "playwright";

const locales = [
  { locale: "en-US", timezoneId: "America/New_York" },
  { locale: "de-DE", timezoneId: "Europe/Berlin" },
  { locale: "fr-FR", timezoneId: "Europe/Paris" },
  { locale: "es-ES", timezoneId: "Europe/Madrid" },
  { locale: "ja-JP", timezoneId: "Asia/Tokyo" },
];

const browser = await chromium.launch();
for (const { locale, timezoneId } of locales) {
  const context = await browser.newContext({ locale, timezoneId, viewport: { width: 1280, height: 800 } });
  const page = await context.newPage();
  await page.goto("https://www.mozilla.org/", { waitUntil: "load" });
  await page.waitForTimeout(1500); // let the hero settle
  await page.screenshot({ path: `mozilla-${locale}.png` });
  console.log(locale, page.url());
  await context.close();
}
await browser.close();

Output:

en-US https://www.mozilla.org/en-US/
de-DE https://www.mozilla.org/de/
fr-FR https://www.mozilla.org/fr/
es-ES https://www.mozilla.org/es-ES/
ja-JP https://www.mozilla.org/ja/

One site in five languages: what changed

The captures show what localization testing with screenshots is for. The layout held up in every language, but the text did not take the same space:

LocaleFinal URLHero heading linesVisible charactersPage height
en-US/en-US/14,7897,411 px
de-DE/de/25,507 (+15%)7,804 px (+5%)
fr-FR/fr/26,106 (+28%)7,918 px (+7%)
es-ES/es-ES/35,530 (+15%)7,825 px (+6%)
ja-JP/ja/13,884 (−19%)7,512 px (+1%)

Characters are the page's visible text without spaces, measured with document.body.innerText. The language versions are not word-for-word translations, so treat the counts as a rough guide to how much text each version carries. The heading lines are counted from the captures. The Spanish heading, Te damos la bienvenida a Mozilla, wraps to three lines, which pushes the text and link below it further down than in any other version.

A screenshot per locale catches exactly this kind of change: a button that moves, a heading that wraps, a label that no longer fits. In a visual regression test, keep one baseline per locale rather than comparing languages against each other. Pin the time zone, too, or a page that prints the time will differ on every run.

When the locale isn't enough

Not every site picks its language from the browser. We ran the same five contexts against airbnb.com:

  • With en-US, it redirected to airbnb.co.uk and served lang="en-GB". The header asked for American English, but the site chose another country version.
  • With es-ES, it went to es.airbnb.com and served lang="es-419", Latin American Spanish, not Spanish for Spain.
  • German, French and Japanese went to de., fr. and ja.airbnb.com as expected.

Sites like this also look at the visitor's location, cookies or a country domain. For them, a locale setting gets you the language but not necessarily the country. To test a country version, open its URL directly, or set the location as well. Playwright supports geolocation with the matching permission, and our screenshot API documents geolocation, timezone and autoLocale options in its geolocation and locale guide.

A checklist for localized screenshots

  1. Set the header, navigator.language and the Intl locale together: Playwright's locale, or the three Puppeteer calls above.
  2. Set a time zone that matches the locale, so dates, times and "today" match what a reader there sees.
  3. Use a new browser context per locale, so a language cookie from one capture doesn't decide the next.
  4. Log the final URL and document.documentElement.lang, and check them before you trust the image.
  5. Don't rely on --lang or LANG in headless mode. In our tests they worked only with extra locale packages on Linux, or in the old headless shell.
  6. Keep one baseline per locale, and look hardest at headings, buttons and navigation, where longer translations wrap first.