npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

i18n-country-translations-data

v1.1.0

Published

Localized country name translations in 168 locales (CLDR-sourced)

Readme

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?

  • Library authors building country/locale tools in any language (Python, PHP, Go, Rust, etc.)
  • Ruby developers using the i18n-country-translations gem
  • JavaScript developers — see the ready-to-use NPM package: i18n-country-translations
  • Go developers — import as a Go module with embedded data
  • Anyone who needs accurate country names in languages beyond the typical 30-50 that most libraries support

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

  • 257 territory codes per locale — full ISO 3166-1 alpha-2 plus EU, XK (Kosovo), and other commonly used codes
  • 168 locales — from major world languages to regional languages like Basque, Cherokee, and Hawaiian

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:

  • No empty or null values
  • Reasonable key count per file
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

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