Skip to content

typekit-i18n

Type-safe internationalization toolkit for TypeScript with runtime APIs, ICU rendering, and CSV/YAML/JSON code generation.

👉 Getting Started — install and configure in minutes

What It Provides

  • Typed translation keys and language unions via generated files
  • Runtime translators with fallback or strict missing behavior
  • Optional category-scoped lookup APIs (translateIn, withCategory)
  • Active language state APIs (setLanguage, getLanguage)
  • Placeholder replacement and named formatter hooks
  • ICU-capable translator for plural/select/selectordinal/number/date/time
  • ICU error callback (onError) for graceful error handling
  • React hooks (useTranslate, TranslationProvider) via @number10/typekit-i18n/react
  • Plural helpers (pluralKey, pluralCategory) for basic translator
  • Validation, conversion, linting, and watch mode via CLI
  • Swift and Kotlin code generation targets
  • JSON, CSV, and YAML resource formats

Workspace Targets

  • packages/typekit-i18n: npm package (runtime + codegen + CLI)
  • apps/playground-ts: React feature playground
  • apps/docs-site: this VitePress documentation site

Documentation Map