Internationalization and Time Zones

Handle language, names, dates, time zones, and money on purpose, with tested fallbacks for the audience you actually serve.

Content date: October 21, 2026.

Plain English

Internationalization (often shortened to i18n) prepares a product to work across languages and regions. Localization adapts it for one particular audience. Language, locale (the region's formatting conventions), currency, and time zone are separate choices. An English speaker can live in Tokyo and pay in euros. Translating the buttons does not settle how to store and read an appointment time, a birthday with no time, or an amount of money.

Use this when

Use it when the product serves several languages, regions, currencies, or time zones, or when dates and money already matter to the core workflow.

If you are just starting

Choose and write down the locales you support, and what happens when one is missing. Use the platform's built-in formatting tools (in JavaScript, Intl) with an explicit locale, currency, and time zone, and do not build date or price text by hand. Name time zones with IANA names such as America/Los_Angeles, not abbreviations like PST. Store the display name a person types, and do not force every name into first-name and last-name boxes. Keep a calendar date separate from an exact moment in time. Never read a localized string such as 03/04/2026 back as data, because it means different dates in different places.

When your project grows

Keep translated text out of the code. Plan for fallbacks, plural forms, text that gets longer in some languages, and right-to-left layout where it applies. Set the page's language with the lang attribute on the html element and its direction with dir, and do not guess one from the other. For user-typed text of unknown direction, dir="auto" lets the browser decide. Store an exact moment in an unambiguous format with its offset, such as 2026-09-18T00:30:00Z. Keep the intended time zone, or a repeating local rule, when scheduling needs it. Daylight saving changes make some local times happen twice or not at all, and you need an explicit product rule for those. Time-zone rules are set by governments and change, so keep your runtime and its time-zone data up to date. Currency formatting changes how an amount looks, and it does not convert exchange rates or give you exact money arithmetic. Check the locale and time-zone support in your production runtime before you rely on its output.

Worked example

A yoga studio stores a class start as an exact UTC moment, 2026-09-18T00:30:00Z. It is September 18 at 9:30 a.m. in Tokyo and September 17 at 5:30 p.m. in Los Angeles. Both labels describe the same class correctly. A member's birthday, September 18, is a calendar date, so it should read September 18 for everyone, no matter where they are. The fixture tests the first case and treats the birthday as a separate data rule.

Practice

Challenge locale and time assumptions

  1. Read the local locale lab and note what its exact moment, calendar date, amount, and display name each mean.
  2. Run the checks for two locales, two time zones, currency, missing-message fallback, and the daylight saving overlap and gap.
  3. In a disposable copy, remove the explicit timeZone option and watch the cross-zone comparison fail. Restore it and rerun.
  4. Complete the worksheet's decisions for ambiguous local input, repeating events, missing translations, names, and right-to-left layout.
  5. Record your runtime and ICU versions, the results, and the real screen, translation, and scheduling checks you would still need.

Deliverable: A table of how each date and time value is stored, the formatting and fallback results you observed, one fixed regression, and a plan for reviewing the localization properly.

Common mistakes to watch for

  • The server runs in UTC, so a reminder meant for 9 a.m. Eastern arrives at the wrong hour.
  • A birthday stored as a timestamp shows up one day early for viewers in the Americas.
  • A price formatted for German readers is mistaken for a conversion into euros.
  • Sentences assembled from pieces, or English-only plural rules, break when translated.
  • A missing translation falls back to a different language and drops an important instruction.

Prompting

A weak prompt

Translate the buttons and use the visitor's country to pick the date format, currency, and how names are shown.

A better prompt

For [workflow], decide the supported languages, locale, currency, and time zone as four separate choices. Treat calendar dates, exact moments, and repeating local times as different data types. Use the built-in formatting tools with explicit settings, message files for text, a visible fallback, and name fields that do not assume a first and last name. Test day boundaries, the daylight saving gap and overlap where relevant, currency codes, missing translations, and right-to-left layout. Tell me which things a formatting demo does not cover: parsing input, translation quality, currency conversion, and a full scheduling engine.

It keeps a display choice from quietly changing the meaning of a date, an amount, or a person's name.

Check before you move on

  • Language, locale, time zone, and currency are chosen separately.
  • Calendar dates are not treated as exact moments.
  • Formatting uses explicit settings, not defaults.
  • You tested the fallback when a translation is missing.
  • Names and text direction have been considered.
  • Daylight saving behavior and what you have not built are written down.

You are done when

  • The fixture keeps the same underlying moment and currency while changing how they are shown.
  • Your report does not treat a formatting check as proof of correct parsing, translation quality, currency conversion, or a working scheduling system.

Questions to think about

A page shows a US dollar price using German formatting, such as 1.234,56 $. Did it convert the price to euros?

No. The locale changed only how the number looks. The currency is still USD, and no exchange rate was applied.

A member's birthday is September 18. A viewer in Los Angeles sees September 17. What went wrong?

The birthday was stored and converted like an exact moment, so the time zone shifted it. A birthday is a calendar date and should stay as a date, with no time zone.

On the night clocks fall back, two bookings both display as 1:30 a.m. Are they the same moment?

Not necessarily. 1:30 a.m. happens twice, once before and once after the change, and the two have different offsets. Store the exact moment and set a rule for ambiguous local input.

Official references