data

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 1 Imported by: 1

README

i18n-timezones-data

Localized timezone name translations in 36 locales — CLDR-sourced, framework-agnostic JSON.

This repository contains the canonical translation data for timezone display names, covering 152 ActiveSupport timezones across 36 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 timezone tools in any language (Python, PHP, Go, Rust, etc.)
  • Ruby developers using the i18n-timezones gem
  • JavaScript developers — see the ready-to-use NPM package: i18n-timezones
  • Go developers — import as a Go module with embedded data
  • Anyone who needs accurate, human-readable timezone names beyond what Intl or ICU provides out of the box

Data Format

Each locale is a single JSON file with flat key-value pairs — no nesting, no complex structure. Keys are ActiveSupport timezone names:

// data/de.json
{
  "International Date Line West": "Internationale Datumsgrenze (Westen)",
  "American Samoa": "Amerikanisch-Samoa",
  "Tokyo": "Tokio",
  "Eastern Time (US & Canada)": "Eastern Time (USA & Kanada)"
}

Coverage

  • 152 timezones per locale (the full ActiveSupport timezone set)
  • 36 locales: ar, bn, ca, cs, da, de, el, en, es, eu, fi, fr, he, hi, hr, hu, id, it, ja, ko, ms, nl, no, pl, pt, pt-BR, ro, ru, sq, sv, th, tr, uk, vi, zh-CN, zh-TW

Repository Structure

data/
  en.json             # English (reference locale)
  de.json             # German
  ja.json             # Japanese
  ...                 # 36 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:

  • All 152 timezone keys are present (matching en.json)
  • No extra or missing keys
  • No empty values
npm run validate
# ✓ All 36 locale files validated successfully (152 keys each)

Usage

Go
import data "github.com/onomojo/i18n-timezones-data"

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

Available as a gem: gem install i18n-timezones-data

Node.js

Available as an npm package or via the higher-level i18n-timezones 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.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL