DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk6 min

How to Take Website Screenshots in Multiple Languages with Playwright

Set a Playwright browser context’s locale, keep viewport and rendering conditions steady, and capture each supported language for review or visual regression.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set Playwright’s locale on a browser context, then capture the same page at the same viewport for each supported language. Locale changes browser language preferences and formatting; it does not translate a site for you. For visual regression, use Playwright Test’s toHaveScreenshot() and generate and compare baselines in a consistent environment.

What locale changes—and what it does not

Playwright emulates locale on the browser context. It affects navigator.language, the Accept-Language request header, and number and date formatting. The website still needs to offer or select translated content, for example through a language switcher, a locale-specific URL, or its own application logic. Setting locale: 'de-DE' alone does not guarantee a German page. See Playwright’s emulation guide and the BrowserContext API reference.

As an Amazon Associate I earn from qualifying purchases.

Timezone is separate. A context’s timezoneId emulates the browser’s timezone; it does not change the test runner’s timezone. If the runner itself needs a timezone, Playwright documents using the TZ environment variable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Capture the same page in several locales

This Node.js example uses Playwright Test. Replace the locale list with locales your product supports and replace the URL with the page under test. If the application uses a language selector rather than locale negotiation, select the language explicitly in each test as well.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
import { test } from '@playwright/test';

const locales = ['en-GB', 'de-DE', 'fr-FR'];

test('capture the page in supported locales', async ({ browser }) => {
  for (const locale of locales) {
    const context = await browser.newContext({
      locale,
      viewport: { width: 1440, height: 900 },
    });
    const page = await context.newPage();

    await page.goto('https://example.com', { waitUntil: 'networkidle' });
    await page.screenshot({ path: `screenshots/home-${locale}.png` });

    await context.close();
  }
});

The fixed viewport makes language the principal variable in the comparison. Add timezoneId when displayed dates or other time-dependent content should reflect a particular region:

const context = await browser.newContext({
  locale: 'de-DE',
  timezoneId: 'Europe/Berlin',
  viewport: { width: 1440, height: 900 },
});

Choose valid locale tags that match the variants your application actually supports. A stable navigation condition is useful, but networkidle is not suitable for every site—for example, pages with persistent network activity may never reach it. In that case wait for a meaningful selector or application-ready state before taking the image.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Choose the capture scope

Playwright’s page.screenshot() can capture the current viewport, a specific element, or the full scrollable page. Use the scope that answers the review question:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Viewport: use the default screenshot when the visible fold or above-the-fold layout matters.
  • Element: call locator.screenshot() to isolate a translated component, such as a navigation bar or checkout panel.
  • Full page: use fullPage: true to capture the full scrollable layout. Full-page capture cannot be combined with an element target.
// Viewport
await page.screenshot({ path: 'viewport.png' });

// One element
await page.locator('[data-testid="navigation"]').screenshot({ path: 'navigation.png' });

// Entire scrollable page
await page.screenshot({ path: 'full-page.png', fullPage: true });

Screenshot output supports PNG, JPEG, and WebP, with scale options for CSS-pixel or device-pixel output. PNG is useful for visual comparison; select another format or scale when the output’s delivery or storage requirements call for it. Consult the Playwright screenshots guide for the current options.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Run repeatable visual comparisons

For a one-off image, page.screenshot() is enough. For regression checks, Playwright Test’s expect(page).toHaveScreenshot() creates a reference image on the first run and compares later runs against it. The assertion takes consecutive screenshots and waits for two to match before using the last one for comparison. See Playwright visual comparisons.

import { test, expect } from '@playwright/test';

test('home page matches its locale baseline', async ({ page }) => {
  await page.goto('https://example.com');
  await expect(page).toHaveScreenshot('home-en-GB.png');
});

Make one test or project per locale so each variant has an explicit, reviewable baseline. Check the generated snapshot files into version control and review image changes. When a genuine design change should alter the reference, review the diff first, then intentionally update snapshots with Playwright’s snapshot update flag, such as --update-snapshots.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Keep the comparison environment stable

Rendered screenshots can vary with operating system, browser version, browser settings, hardware, power source, headless mode, and other conditions. Generate and compare baselines in the same environment, and keep browser/project and platform distinctions in mind when organizing snapshots. A locale comparison should hold the viewport and browser environment steady unless responsive layout or platform rendering is also part of the test.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build a useful language and viewport matrix

There is no universal locale list or fixed number of screenshots that suits every product. Start from supported locales, the routes and language-selection behavior your app uses, and product requirements or user traffic. Include variants that can expose layout pressure, such as longer translated labels, and add viewport or device variants when responsive behavior matters. Playwright provides device descriptors and viewport settings; keep dimensions identical when isolating locale effects.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Add timezone variants only when content depends on local time. If testing both language and responsive layout, vary those dimensions deliberately rather than changing them unpredictably in the same comparison. Playwright’s configuration reference covers the related locale, viewport, and timezoneId settings: Configuration (use).

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

  • The screenshot stays in the default language. Locale sets browser language preferences; it cannot supply translations. Confirm that the site supports the locale and that its language negotiation or selector is responding to the locale or URL.
  • Dates or numbers differ unexpectedly. Check both the locale and, if relevant, timezoneId. The test runner timezone is separate from the browser timezone; set TZ for the runner if needed.
  • Baselines fail on another machine. Compare using the same OS, browser version, settings, and headless mode used to create the reference. Differences in rendering environment can produce image diffs unrelated to a translation change.
  • Navigation waits indefinitely. A page with continuous network requests may not become network-idle. Wait for a page-specific ready selector or another stable application state instead.
  • A full-page screenshot does not target a component. Full-page capture and element-target capture are separate scopes. Capture the element with its locator, or take a full-page screenshot without an element target.
  • Every locale appears to share one baseline. Give each locale a distinct test/project or snapshot name so a baseline from one language cannot stand in for another.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. A single GET request can return a screenshot or PDF; its clean-shot options accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture, with each step switchable. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and other MCP clients. It is useful when you need capture without managing a browser context yourself; it does not replace Playwright’s locale emulation for testing language-specific browser behavior.

For a basic call, use the API key and target URL below. The URL shown is an example; substitute the page to capture. See the ScreenshotNeo API documentation for request options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo’s Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. Sign up for 1,000 free screenshots a month, with no card required.

Frequently Asked Questions

Does Playwright translate a page when I set its locale?

No. Locale emulates browser language preferences and formatting. The website must provide or select the translated content.

Should locale and timezone always be changed together?

No. Set a timezone only when the page’s time-dependent content needs it; timezone is a separate browser-context setting.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.