GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • FormatJS
  • Docs
  • ICU syntax
  • GitHub
  • react-intl
  • Polyfills
  • CLI
  • Rust

This view

  • Original page
  • New address

GeezerVison is showing formatjs.github.io — FormatJS - Internationalize your web apps

count42

Ship in42 languages

locale

FormatJS is a set of JavaScript libraries for internationalization, built on ICU MessageFormat, Unicode CLDR and the ECMA-402 Intl APIs.

Show messageon
lang/en.jsonIntl.PluralRules('en').select(42) → other
{
  "hero.ship": "Ship in",
  "hero.count": "{count, plural, =0 {no languages} one {# language} other {# languages}}"
}

In Arabic, 3 is few

CLDR gives Arabic six plural categories, English two and Japanese one. FormatJS selects the branch with Intl.PluralRules, so every translation says the number the way its own grammar does.

countlocale: ar
3
  • zero
  • one
  • two
  • few
  • many
  • other

3 رسائل جديدة

From component to catalog

First, declare messages where they render.

defineMessages keeps the English default, a note for translators and a stable ID next to the component that uses it.

Then extract them with one command.

formatjs extract reads your source and writes a catalog your translation tool can open. The CLI ships native binaries for macOS, Linux and Windows.

Finally, compile and ship each locale.

formatjs compile --ast pre-parses every translation, so the browser formats messages without loading the parser.

Inbox.tsxTerminalcompiled-lang/fr.json
import {defineMessages, FormattedMessage} from 'react-intl'

const messages = defineMessages({
  unread: {
    defaultMessage:
      '{count, plural, one {# new message} other {# new messages}}',
    description: 'Inbox header, count of unread mail',
  },
})

export function InboxHeader({count}) {
  return (
    <h2>
      <FormattedMessage {...messages.unread} values={{count}} />
    </h2>
  )
}

Pick your stack.
The libraries follow.

Read the docs

Downloads · last 30 days (2026-09-23–2026-10-22)

react-intlComponents and hooks for React and React Native12M downloads in the last 30 daysnpm@formatjs/intlThe framework-agnostic core that react-intl is built on13.1M downloads in the last 30 daysnpmeslint-plugin-formatjsLint rules for message syntax, placeholders and IDs2.8M downloads in the last 30 daysnpmRead the React guide→

In production at

  • Anthropic
  • Perplexity
  • OpenAI
  • Discord
  • Atlassian
  • Elastic
  • Salesforce
  • Grafana Labs
  • Red Hat
  • Mattermost
  • Canva
  • Google
  • Microsoft
  • Amazon Web Services
  • Adobe
  • Cisco
  • Block
  • Box
  • Databricks
  • Snowflake
  • Oracle
  • Yahoo
  • Dropbox
  • Tinder
  • Ethereum
  • Mozilla
  • Coinbase

Start with

Copies npm i react-intl to your clipboard. The installation guide takes it from there.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.