GenerateRandomSearch

Locale Code Picker

Picks a real BCP 47 locale code — language plus region, like fr-CA or zh-TW — a quick way to spot-check internationalisation, formatting or translation-fallback behaviour.

What you'll get

This generator draws from a hand-checked list of 22 entries. Here is a spread of 6 of them, so you can see the style before you generate:

  • en-US — English (United States)
  • fr-FR — French (France)
  • es-MX — Spanish (Mexico)
  • nl-NL — Dutch (Netherlands)
  • ko-KR — Korean (South Korea)
  • ar-SA — Arabic (Saudi Arabia)

A fixed sample of the list, not a live draw — your own results are picked at random from all 22, without repeating until the list runs out. BCP 47 / Unicode CLDR locale identifiers (public standard, well-known codes).. Last reviewed 2026-07-18.

How to use this tool

  1. Press generate for a locale.
  2. Generate again for a different one.

Common use cases

  • Testing internationalisation/localisation code
  • Populating a locale-picker demo
  • Documentation examples

Limitations and good to know

  • 22 well-known locales out of the hundreds BCP 47 permits — enough to catch common regional formatting differences, not a substitute for testing against your actual supported locale list.
  • Only one right-to-left locale is included (ar-SA), which is enough to trigger RTL layout code but not to exercise the full range of RTL and bidirectional text behaviour.
  • The code names a locale; it does not apply one. Testing your date, number or currency formatting still means passing the code into that code yourself.

Practical tips

  • Test a right-to-left locale as well as left-to-right ones; layout problems only appear there.
  • Remember that a locale sets number and date formatting as well as language — a decimal comma breaks a surprising amount of parsing.

Entries are chosen with your browser's cryptographic random number generator, so every entry on the list is equally likely. How Generate Random works.

Frequently asked questions

Why does en-US format things differently from en-GB if the language is the same?
Because a locale carries the region as well as the language, and the region is what actually sets date order, decimal separators and currency symbols — en-US writes 3/4/2026 for a date, en-GB writes 4/3/2026 for the same day. Testing with several English locales, not just one, catches formatting bugs a single-locale test misses entirely.