A user in Reykjavík opens your checkout in Icelandic. The labels, buttons, and errors are in Icelandic. The country picker says "Germany", "Iceland", "United Kingdom". Another user in Taipei sees a name for Taiwan that your Chinese translator never chose, because it came from a JSON file in an npm package. A third user's saved profile still says "Turkey" after you renamed it in one language file and not the others.
Country and region names show up in phone inputs, address and billing forms, shipping and tax settings, content availability notices, and admin filters. Teams usually treat them as data rather than copy, so they skip translation review entirely. This guide is for web and mobile engineers who own those screens. It covers where localized names should come from on each platform, how they fail, and a small amount of structure that keeps every locale correct and consistent.
The short answer
- Store and exchange region codes, never display names.
- Decide which codes your product accepts, based on the systems you integrate with.
- Generate names at render time from the platform's CLDR data:
Intl.DisplayNameson the web,Locale.localizedString(forRegionCode:)on Apple platforms,Locale.getDisplayCountry(Locale)on Android. - Detect missing data and silent English fallback for every locale you ship, and fill the gaps from a small reviewed override table.
- Make one naming decision per sensitive code and apply it to every locale.
- Sort with the display locale's collation, after the names are localized.
Why hand-typed and vendored lists keep failing
The oldest answer to "how do I show countries in a picker" is a hard-coded array. A Stack Overflow question with more than 36,000 views starts from exactly that: an old project with "a list of countries manually typed out inside a set of square brackets" feeding a UIPickerView (Stack Overflow: How do I get a list of countries?). An even older question asks where to get country names in all languages, and its accepted answer points to the Unicode CLDR (Stack Overflow: Localized country names).
The next step most teams take is a package that ships one JSON file per language. umpirsky/country-list offers country names "in all languages and data formats", and i18n-iso-countries maps ISO 3166-1 codes to names in dozens of languages. Both are useful, and both move the maintenance problem into your bundle. Names change: the i18n-iso-countries tracker has an issue for Turkey becoming Türkiye (GitHub: i18n-iso-countries #301). Codes go missing: another issue reports that AC (Ascension Island) and TA (Tristan da Cunha) are absent from the files (GitHub: i18n-iso-countries #385). Each fix lands only when you upgrade the package, and only in the files someone remembered to edit.
The V8 team gives the case for using the runtime instead. The translations already exist in CLDR, packaging them "incurs a cost on developer time", and "keeping that data up to date with the world's geopolitical happenings requires constant maintenance". Most JavaScript runtimes already ship that data and keep it current (V8: Intl.DisplayNames).
Where each platform gets its names
All three major platforms expose CLDR region names. The calls look different, and so do their edge cases.
Web and Node.js
Intl.DisplayNames with type: "region" takes a two-letter ISO 3166 code or a three-digit UN M49 area code and returns a name in the requested locale (MDN: Intl.DisplayNames.prototype.of()).
const names = new Intl.DisplayNames(["de"], { type: "region" });
names.of("DE"); // "Deutschland"
names.of("419"); // a localized "Latin America"
Pass uppercase codes, because MDN says lowercase ones "may not work reliably everywhere", and expect the fallback option to default to "code", which returns the input code when there is no name (MDN: Intl.DisplayNames.prototype.of()). A picker that shows "XK" or "AC" as a label is usually this fallback at work. style: "short" gives the shorter CLDR form where one exists, such as "US" for the United States.
iOS, iPadOS, and macOS
Foundation's Locale.localizedString(forRegionCode:) "returns a localized string for a specified region code" (Apple: localizedString(forRegionCode:)). Call it on the locale you want the name in, not on the region's own locale:
let display = Locale(identifier: appLanguageTag)
let name = display.localizedString(forRegionCode: "IS") ?? "IS"
Use the app's selected language here, not Locale.current, when the app has its own language setting. Most answers on the older Stack Overflow thread build the list from NSLocale.isoCountryCodes or Locale.isoRegionCodes. Apple deprecated that property in iOS 16 and points to Locale.Region.isoRegions instead (Apple: isoRegionCodes). Neither list is the set of codes your product accepts.
Android and the JVM
java.util.Locale has getDisplayCountry(Locale inLocale) for a country name localized to a given locale, and getISOCountries() for "all 2-letter country codes defined in ISO 3166" (Android: java.util.Locale). Build a Locale from an empty language and the region code, then ask for its country name in the display locale:
val display = Locale.forLanguageTag(appLanguageTag)
val name = Locale("", "IS").getDisplayCountry(display)
As on iOS, pass the app's selected language rather than the device default if users can change language inside the app.
Catch silent English fallback before users do
Runtime data has gaps, and the gaps rarely throw errors. The intl-tel-input project, which renders country names with Intl.DisplayNames, documents one of them: "Some browsers ship a reduced Intl.DisplayNames dataset that omits country names for certain locales, silently falling back to English." It names desktop Chrome and nine locales: Azerbaijani, Bosnian, Irish, Armenian, Icelandic, Macedonian, Maltese, Albanian, and Uzbek. The library works around it by bundling its own names for those locales (intl-tel-input: Localisation). Treat that list as a vendor report for one browser at one time, not a permanent rule.
Desktop Chrome can return English country names for some locales without any error, so compare each name against the English output and fill gaps from a reviewed override table. The fallback: "none" option does not catch this case, because the API did find a name, in English.
We ran a quick check in Node.js 20.19.2 (ICU 76.1, CLDR 46) to see the related locale-negotiation case. Creating Intl.DisplayNames(["xx"], { type: "region", fallback: "none" }) for an unsupported tag still returned "Germany" for DE, and resolvedOptions().locale reported en-US. The same Node build returned Azerbaijani and Icelandic names for those locales, so a list rendered on a Node server and the same list rendered in a browser can disagree.
A practical check uses both signals:
function regionNamesFor(locale, codes, overrides) {
const dn = new Intl.DisplayNames([locale], { type: "region", fallback: "none" });
const en = new Intl.DisplayNames(["en"], { type: "region", fallback: "none" });
const negotiated = dn.resolvedOptions().locale;
const baseMatches = negotiated.split("-")[0] === locale.split("-")[0];
return codes.map((code) => {
const override = overrides[locale]?.[code];
if (override) return { code, name: override, source: "override" };
const name = dn.of(code);
const english = en.of(code);
const suspect = !baseMatches || !name || (!locale.startsWith("en") && name === english);
return { code, name: name ?? code, source: suspect ? "suspect" : "runtime" };
});
}
Some names really are identical in English and another language, for example "Malta" in many European languages. That is why the check marks a name as suspect rather than wrong. Run it in CI or in a test page per target browser, log the suspect rows, and let a reviewer decide which ones need an override. On iOS and Android the system ships its own ICU data, so run the same comparison on the oldest OS version you support.
Keep the override table small and owned. Each entry needs a code, a locale, the reviewed name, and a reason, so the next person can remove it when the runtime catches up.
Make one naming policy per sensitive code
Some region names are political. CLDR's translation guidelines say to use the most customary name in each language rather than the ISO or official form, and to treat "politically sensitive names" carefully. For several codes CLDR also records alternative short or variant forms: "Hong Kong SAR China" with a short form "Hong Kong", "Palestinian Territories" with a short form "Palestine", "Congo - Kinshasa" with a variant "Congo (DRC)", and "Falkland Islands" with a variant that includes "Islas Malvinas" (Unicode CLDR: Country/Region (Territory) Names). The same guideline records that North Macedonia replaced the earlier form in 2019.
Static per-language files can make this decision for you, inconsistently. An open i18n-iso-countries issue from March 2026 lists the TW entry across its locale files: 中国台湾省 in the Chinese file, a form meaning "Taiwan, Province of China" in the Ukrainian file, and plain "Taiwan" or a transliteration in most others (GitHub: i18n-iso-countries #387). An app using those files takes a different position depending on the user's language, and nobody on the team chose it. In an older issue a customer asked to rename Hong Kong and Taiwan for Chinese users; a contributor suggested remapping the names by ISO code in application code, and the maintainer declined to change the library (GitHub: i18n-iso-countries #266).
Decide the name for each sensitive region code once and apply that decision to every locale through an override layer, because static per-language files can carry different political choices for the same code. In practice:
- Keep a short policy file keyed by region code, owned by product and legal, with the chosen form (
default,short, or a reviewed custom string) and the reason. - Apply it in the same function that generates names, for every locale, so no language escapes it.
- If a market needs a different form, make that an explicit market rule in the policy file, reviewed like any other legal copy, rather than an edit in one language file.
- Version the file. When the decision changes, you can show when and why.
This is a recommendation drawn from the sources above, not legal advice. It makes the decision visible and keeps it the same in every language.
Define the region codes your product accepts
Platform lists contain more than countries. In the same Node.js check, Intl.DisplayNames in English returned names for EU (European Union), UN (United Nations), QO (Outlying Oceania), ZZ (Unknown Region), AC (Ascension Island), TA (Tristan da Cunha), and XK (Kosovo). Some of those are useful in a phone input or a shipping form. Others make no sense as a billing country. Meanwhile the ISO-based package mentioned earlier lacked AC and TA entirely (GitHub: i18n-iso-countries #385).
Define the exact set of region codes your product accepts from its own integrations, because ISO 3166-1, CLDR, and partner lists do not contain the same codes. Your payment provider, shipping carriers, tax engine, and phone-number library each have a list. Your picker should show the intersection or union you have chosen on purpose, generated from one configuration file, with names produced for exactly those codes. If a name lookup returns the code itself, treat that as a configuration error to fix, not a label to ship.
Subdivisions are a separate problem. Intl.DisplayNames does not accept ISO 3166-2 codes such as GB-ENG; one Stack Overflow answer explains that the API implements ECMA-402, not the full ISO 3166-2 list (Stack Overflow: ISO 3166-2 subdivision codes with Intl.DisplayNames). In our Node check, of("GB-ENG") threw a RangeError. If you need England, Scotland, US states, or provinces, use a dedicated dataset and translate those names through your normal localization workflow.
Store codes and render names late
Never store the display name as the identity. Another Stack Overflow question asks how to reverse Intl.DisplayNames, turning "United States" back into "US", and the only answer suggests a separate lookup package (Stack Overflow: Reverse Intl.DisplayNames region value). That need almost always means a name was stored where a code belonged. Names change with renames, policy decisions, and runtime upgrades, so a stored "Turkey" stops matching a rendered "Türkiye".
The i18nAgent guide to country-aware address forms makes the same recommendation for addresses: store a stable code, not a localized country name. The international phone number input guide adds that a country list should show the localized name with the calling code, support text search, and relocalize labels when the interface language changes while the selected region stays the same. Both depend on names being generated at render time from codes.
Render late also means re-rendering after an in-app language change. If you cache a list of names, key the cache by display locale and by the version of your policy and override files.
Sort and search after localizing
Sort the list after you have the localized names, with the display language's collation, not the English order or the code order. A quick check with Intl.Collator("sv") placed "Åland" and "Österrike" after "Zambia", which is correct Swedish order and wrong if you sorted by English names first. Pin a few entries at the top only if you have a real reason, such as the user's current region.
Search should match the localized name, the English name, and the code, because users type whichever they know. Keep the stored value as the code regardless of what they typed.
Currency and language names use the same APIs
Intl.DisplayNames also accepts type: "currency" and type: "language", and the same fallback checks apply (MDN: Intl.DisplayNames() constructor). Language pickers have extra rules, such as showing each language in its own name, and currency amounts belong to number formatting rather than display names. Keep those concerns in their own components.
Test every launch locale
A short test suite catches most regressions:
- For each launch locale and each accepted code, generate the name and assert it is not the bare code.
- Run the English-equality check from earlier and fail the build on new suspect rows that have no override or recorded exception.
- Assert that every sensitive code in the policy file renders the chosen form in every locale.
- Assert that the list sorts with the display locale's collator.
- Switch the app language while a country is selected and assert that the label changes and the stored code does not.
- Run the web checks in each browser you support, and the mobile checks on the oldest OS version you support, since each ships its own data.
Common mistakes
- Typing or vendoring a country list and translating it by hand.
- Saving the localized name in a profile, order, or analytics event.
- Trusting
fallback: "none"to detect missing translations. - Letting each language file decide the name of a sensitive region.
- Building the picker from every code the platform knows, including
EU,UN, andZZ. - Passing ISO 3166-2 subdivision codes to a country-name API.
- Sorting by English name and then translating.
What to do next
Find every place your app shows a country or region name and note where the name comes from. Replace hard-coded and vendored names with a single function that takes a code and a display locale, applies your policy and override files, and calls the platform API. Then add the suspect-name check to CI for your launch locales and review what it finds.
