How to test a multilingual website: locales, currencies, dates, URLs, and fallbacks
Updated:
A multilingual website is not simply the same page with different words. Changing language can also change currency, date formatting, navigation, page URLs, and the space required by a label. This guide explains how to cover those differences with shared automated scenarios instead of cloning the entire suite for every language.
Why one copy of every test per language breaks down
Consider the same checkout in English, Czech, and Slovak. With three copied tests, every checkout change has to be implemented three times. Before long, one copy uses the new payment flow, another still targets the old screen, and the third runs successfully while asserting a different business outcome.
Language and region are also easy to conflate. English for the United Kingdom may use a different currency, time zone, and date format from English for the United States. A locale therefore represents an agreed combination of linguistic and regional conventions, not merely the label displayed in a language switcher.
Share the scenario and control the locale matrix
Separate behaviour from localised data
Keep the checkout steps and expected business outcome in one scenario. Supply the language, region, currency, expected URL, and necessary text values through configuration. The test then receives different inputs without duplicating the logic that defines success.
Find controls using stable semantics or an agreed test identifier. A selector tied to the English word “Continue” fails in Czech even when the application is working correctly. The broader guide to preparing a website for test automation explains the other conditions that keep a scenario maintainable.
Check more than translated labels
- Language selection and persistence: the switcher selects the correct variant and, where the product requires it, the choice survives a refresh, sign-in, and navigation to the next step.
- Numbers, currencies, and dates: use a fixed source value and compare the rendered result with the rules for that locale. Unicode CLDR provides locale data for dates, times, numbers, and currency symbols, but the product still needs explicit rules for the markets it supports.
- URLs and navigation: the locale path, domain, or parameter remains correct after internal navigation or a redirect, and when using browser history. Define what should happen when a localised URL does not exist.
- Unicode and layout: enter names with diacritics, longer strings, and, where relevant, other scripts or writing directions. Confirm that text does not cover a button, tables remain usable, and a saved value can be read back unchanged.
- Fallback behaviour: if a translation key or whole locale is missing, the application should use the agreed fallback language or show a controlled error. A raw translation key or empty heading is not an acceptable fallback.
Playwright can emulate browser locale and time zone. That setting does not necessarily switch every application: the product may derive language from the URL, account, cookie, or a server header. Set the same inputs that the real product uses, then assert the visible output and business outcome.
Run combinations according to risk
The primary locale can receive broad coverage on regular changes. Other languages can run critical journeys plus checks for their specific risks, such as an address form, currency formatting, or a right-to-left layout. As with a cross-browser test matrix, coverage should reflect actual usage, supported markets, and the impact of a defect.
A short multilingual smoke suite can run at a suitable point in CI/CD. A wider matrix may run overnight or before release so that it does not delay every small change.
Language, currency and time zone are separate choices
Switching to Czech need not change EUR to CZK. An English page can sell in euros and display times according to the customer’s account. Record content language, regional formatting, business currency and time zone separately. If the product really changes prices when switching markets, it needs its own rules for price lists, conversion and rounding.
JavaScript’s Intl.NumberFormat formats numbers. ECMA-402 describes separate currency and precision settings. The formatter does not convert prices using an exchange rate. Check the numeric amount and currency stored by the system as well as their agreed display. Do not derive expectations solely from the same formatting helper the application uses. You could reproduce the same defect.
For dates, distinguish a calendar day from a particular instant. A birthday and the time an order was created may need different handling. Test times close to a day boundary and, for supported zones, daylight-saving transitions. Playwright’s browser time-zone setting does not automatically change the test process or server time zone.
A short model: the same basket in three locales
Consider a shop that uses EUR in every language version. Item TEST-A costs 19.90 EUR and quantity 2 gives a total of 39.80 EUR. This model has no discount or additional fee. For each locale, check the same stored amount and a different, product-approved display format.
| Locale | What stays the same | What is checked separately |
|---|---|---|
sk-SK |
TEST-A, quantity 2, total 39.80 EUR |
Slovak text, price formatting and the Slovak URL path. |
cs-CZ |
TEST-A, quantity 2, total 39.80 EUR |
Czech text, price formatting and the Czech URL path. |
en-US |
TEST-A, quantity 2, total 39.80 EUR |
English text, price formatting and the English URL path. The currency stays EUR. |
Specify the currency symbol position, decimal separator and permitted spacing in your expectations. Do not strip all punctuation just because visually similar strings fail a comparison. Equally, do not demand one exact string across browsers if the product permits several correct representations.
If users enter a price or quantity, also check input processing. Displaying a decimal comma does not prove that an entered value is parsed correctly. Rejection of an invalid format needs a clear message in the current language and must not silently save a different amount.
Switching language during an unfinished task
Add the model item to the basket, fill the supported address fields and switch language before confirmation. Under the agreed rules, the item, quantity and draft values should remain. Then refresh, go back and check the next step. In this model, switching language does not create a new order or another payment.
Also switch after a validation error. Translating navigation is insufficient if a field warning remains in the old language or loses its association with the invalid field. Check longer translations on a narrow screen and under zoom. Checking one button’s width does not confirm that the entire form is operable.
Prepare conflicting inputs: the URL selects Slovak, the account has Czech and the browser uses English. The product must define which takes precedence. Check that rule rather than accepting whichever language appears. A second user in a separate session must not receive the first user’s language choice because the server reused an incorrect cached response.
Document language and controlled fallback
After switching, also verify the declared document language, for example the lang attribute on the html element. WCAG 3.1.1 requires the page’s default language to be programmatically determinable. This helps screen readers select pronunciation rules. The document’s language code need not mirror every regional price or time setting.
Prepare a missing translation through controlled test input. Check the main content, error message and subsequent step, rather than merely confirming that the page is not blank. Fallback must follow the product rule without displaying an internal key. For an unavailable language version, the user should understand where a switcher or redirect has taken them.
A defect report should include the input locale, account language, URL, time zone, application version and specific incorrect value. These details help distinguish a bad translation from incorrect setting precedence or data handling. An automated document-language check does not itself confirm natural wording or the page’s overall accessibility.
What functional automation cannot judge
An automated check can expose missing copy, a wrong currency, a broken URL, or text overflowing its container. It cannot judge whether a translation sounds natural, uses the right tone, or carries the intended cultural meaning. Linguistic review and an SEO audit of localised pages, including hreflang and indexation, need separate verification. Some technical SEO checks can be automated, but a successful checkout scenario does not itself confirm them.
What you gain
- One maintained scenario rather than several drifting copies.
- Verification of both the business outcome and regional differences.
- A smaller matrix driven by usage and risk.
- A clear boundary between functional automation, linguistic review, and SEO.
Next step
List the supported language-and-region combinations. For each, record the critical journey, currency, date format, URL rule, and expected fallback. Use that information to create one shared scenario and run it against a small matrix selected by risk.