# airbnb/polyglot.js

Give your JavaScript the ability to speak many languages.

Repository: https://github.com/airbnb/polyglot.js
Canonical: https://ross.abutalabs.com/products/polyglotjs
Homepage: http://airbnb.github.io/polyglot.js
Language: JavaScript
License: BSD-2-Clause
License Family: permissive
Last push: 2025-11-06T00:54:17+00:00

## Health v2 (maintenance only)
Score: 55/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 50, release rhythm 35, longevity 100
- inputs: {"age_days": 5088, "days_push": 301, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3724, forks 205 (observed 2026-08-28T04:08:15.618681+00:00)

## What it is
Polyglot.js is a tiny I18n helper library for JavaScript that runs in both the browser and Node.js (CommonJS) environments. It manages dictionaries of already-translated phrases and provides message lookup with interpolation and pluralization rules, while remaining agnostic to any translation backend or service.

## Use cases
- translate my javascript app's ui strings into multiple languages
- handle pluralization rules for different languages in js
- interpolate variables into translated messages in the browser
- manage per-locale phrase dictionaries for express requests
- add lightweight i18n to a backbone or node app without a heavy framework
- pass localized strings from a rails backend into client-side javascript

## When to choose
- You need a small, lightweight helper for string lookup, interpolation, and locale-aware pluralization in browser or Node code
- You already obtain translations from another backend, service, or team and only need a way to store and retrieve phrases
- You need isolated per-request locale instances on a server (e.g., Express) without concurrent requests clobbering each other's phrases

## When to avoid
- You expect the tool to translate text for you — it performs no translation and has no translation backend integration
- You need full-featured i18n such as ICU MessageFormat, date/number/currency formatting, or message catalog extraction tooling
- You want framework-level locale routing or built-in SSR language switching rather than a phrase-lookup helper

## Facets
- artifact type: library
- maturity: stable
- function: internationalization
- domain: web-development, frontend
- platform: browser, cross-platform
- tags: i18n, translation-phrases, pluralization, string-interpolation, locale-management, javascript-library, lightweight, localization, nodejs

## Member repositories
- airbnb/polyglot.js (main) score 55

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:15.618681+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:29:17.006747+00:00, confidence not recorded.
  - readme: https://github.com/airbnb/polyglot.js (fetched 2026-08-28T04:08:15.618681+00:00, sha 48950b6b52bb)
  - homepage: http://airbnb.github.io/polyglot.js (fetched 2026-08-29T09:24:14.438693+00:00, sha 39986b09db3b)
  - site_page: https://polyglot-js.airbnb.tech/CHANGELOG.html (fetched 2026-08-29T09:24:14.448061+00:00, sha ad7984ee3ade)
- Data as of 2026-08-30T08:39:29.467469+00:00.
