i18n-country-translations-data

Localized country name translations in 168 locales — CLDR-sourced, framework-agnostic JSON.

This repository contains the canonical translation data for country and territory names, covering 257 ISO 3166-1 alpha-2 codes across 168 locales. The data is sourced from the Unicode CLDR and stored as flat, human-readable JSON — easy to consume from any language or framework.

Who is this for?

Why 168 locales?

Most translation datasets cover 30-80 major languages and stop there. That leaves hundreds of millions of speakers without support — Punjabi (113M speakers), Telugu (82M), Tamil (78M), Gujarati (56M), Yoruba (45M), and dozens more.

This dataset doesn't cut corners. If CLDR has the data, it's here.

Data Format

Each locale is a single JSON file with flat key-value pairs — no nesting, no complex structure:

// data/de.json
{
  "US": "Vereinigte Staaten",
  "GB": "Vereinigtes Königreich",
  "DE": "Deutschland",
  "JP": "Japan",
  "NO": "Norwegen"
}

Coverage

View all 168 locales af, ak, am, ar, as, az, be, bg, bm, bn, bo, br, bs, ca, cs, cy, da, de, dz, ee, el, en, eo, es, et, eu, fa, ff, fi, fo, fr, ga, gd, gl, gu, ha, he, hi, hr, hu, hy, ia, id, ig, is, it, ja, ka, ki, kk, kl, km, kn, ko, ky, lg, ln, lo, lt, lu, lv, mg, mk, ml, mn, mr, ms, mt, my, nb, nd, ne, nl, nn, or, pa, pl, ps, pt, pt-BR, rm, rn, ro, ru, se, sg, si, sk, sl, sn, so, sq, sr, sv, sw, ta, te, th, ti, to, tr, uk, ur, uz, vi, yo, zh, zh-CN, zh-HK, zh-TW, zu, asa, bas, bez, brx, byn, cgg, chr, dav, dje, dyo, ebu, ewo, fil, fur, gsw, guz, haw, jmc, kab, kam, kde, kea, khq, kln, ksb, ksf, ksh, lag, luo, luy, mas, mer, mfe, mgh, mua, naq, nmg, nus, nyn, rof, rwk, saq, sbp, seh, ses, shi, swc, teo, tig, twq, tzm, vai, vun, wae, wal, xog, yav

Repository Structure

data/
  en.json             # English (reference locale)
  de.json             # German
  ja.json             # Japanese
  zh-TW.json          # Traditional Chinese
  ...                 # 168 locale files total
scripts/
  validate.js         # Validate consistency across all locale files
data.go               # Go embed directive
go.mod                # Go module definition

Validation

Every locale file is validated to ensure:

npm run validate
# Validated 168 locale files (en has 258 keys)
# ✓ No critical errors

Usage

Go

import data "github.com/onomojo/i18n-country-translations-data"

// data.FS is an embed.FS containing data/*.json

Ruby

Available as a gem: gem install i18n-country-translations-data

Rust

Available as a crate on crates.io:

# Cargo.toml
[dependencies]
i18n-country-translations = "*"

Node.js

Available as an npm package or via the higher-level i18n-country-translations package.

Data Source

All translations come from the Unicode CLDR (Common Locale Data Repository) — the industry-standard source used by every major platform including iOS, Android, Chrome, and Java. This ensures translations are accurate, consistent, and maintained by native speakers through Unicode's established review process.

Related

License

MIT