MCPcopy
hub / github.com/amannn/next-intl

github.com/amannn/next-intl @v4.13.1 sqlite

repository ↗ · DeepWiki ↗ · release v4.13.1 ↗
805 symbols 2,634 edges 553 files 21 documented · 3%
README

  <img alt="next-intl" src="https://github.com/amannn/next-intl/raw/v4.13.1/media/logo.svg" width="600">

Internationalization for Next.js.

Features

Internationalization (i18n) is an essential part of the user experience, therefore next-intl gives you all the parts you need to get language nuances right.

  • 🌟 ICU message syntax: Localize your messages with interpolation, cardinal & ordinal plurals, enum-based label selection and rich text.
  • 📅 Dates, times & numbers: Apply appropriate formatting without worrying about server/client differences like time zones.
  • Type-safe: Speed up development with autocompletion for message keys and catch typos early with compile-time checks.
  • 💡 Hooks-based API: Learn a single API that can be used across your code base to turn translations into plain strings or rich text.
  • 🚀 Next.js-native and performance-obsessed: App Router, Server Components, static rendering—pick the right tool for the right job, next-intl works everywhere.
  • 🌍 Internationalized routing: Provide unique pathnames per language and optionally localize pathnames for search engine optimization.

What does it look like?

// UserProfile.tsx
import {useTranslations} from 'next-intl';

export default function UserProfile({user}) {
  const t = useTranslations('UserProfile');

  return (
    <section>
      <h1>{t('title', {firstName: user.firstName})}</h1>


{t('membership', {memberSince: user.memberSince})}




{t('followers', {count: user.numFollowers})}


    </section>
  );
}
// en.json
{
  "UserProfile": {
    "title": "{firstName}'s profile",
    "membership": "Member since {memberSince, date, short}",
    "followers": "{count, plural, ↵
                    =0 {No followers yet} ↵
                    =1 {One follower} ↵
                    other {# followers} ↵
                  }"
  }
}

→ Read the docs

Crowdin logo

Hosted on Vercel

Extension points exported contracts — how you extend this code

RelativeTimeFormatOptions (Interface)
* An object with some or all of properties of `options` parameter * of `Intl.RelativeTimeFormat` constructor. *
packages/use-intl/types/index.d.ts
RelativeTimeFormatOptions (Interface)
* An object with some or all of properties of `options` parameter * of `Intl.RelativeTimeFormat` constructor. *
packages/next-intl/types/index.d.ts
AppConfig (Interface)
(no doc)
examples/example-pages-router/global.ts
AppConfig (Interface)
(no doc)
examples/example-app-router-playground/global.ts
AppConfig (Interface)
(no doc)
examples/example-app-router/global.ts
AppConfig (Interface)
(no doc)
examples/example-use-intl/global.ts
ResolvedRelativeTimeFormatOptions (Interface)
* An object with properties reflecting the locale * and formatting options computed during initialization * of the
packages/use-intl/types/index.d.ts
ResolvedRelativeTimeFormatOptions (Interface)
* An object with properties reflecting the locale * and formatting options computed during initialization * of the
packages/next-intl/types/index.d.ts

Core symbols most depended-on inside this repo

t
called by 286
packages/swc-plugin-extractor/tests/fixture/shadow/input.js
middleware
called by 131
examples/example-app-router-playground/src/proxy.ts
get
called by 113
packages/next-intl/src/extractor/extractor/LRUCache.tsx
compile
called by 66
packages/icu-minify/src/compile.tsx
set
called by 64
packages/next-intl/src/extractor/extractor/LRUCache.tsx
getPathname
called by 48
packages/next-intl/src/navigation/shared/createSharedNavigationFns.tsx
useTranslations
called by 47
packages/use-intl/src/react/useTranslations.tsx
useTranslations
called by 47
packages/next-intl/src/react-server/useTranslations.tsx

Shape

Function 672
Method 81
Class 30
Interface 21
Enum 1

Languages

TypeScript100%

Modules by API surface

packages/next-intl/src/extractor/catalog/CatalogManager.tsx28 symbols
packages/next-intl/src/shared/utils.tsx19 symbols
packages/next-intl/src/middleware/utils.tsx16 symbols
packages/use-intl/src/react/useTranslations.test.tsx15 symbols
packages/next-intl/src/extractor/ExtractionCompiler.test.tsx15 symbols
packages/use-intl/src/core/createFormatter.tsx13 symbols
packages/icu-minify/src/format.tsx13 symbols
packages/icu-minify/src/compile.tsx12 symbols
packages/use-intl/types/index.d.ts10 symbols
packages/next-intl/types/index.d.ts10 symbols
packages/next-intl/src/react-server/useTranslations.test.tsx10 symbols
packages/next-intl/src/plugin/getNextConfig.tsx10 symbols

Dependencies from manifests, versioned

@arethetypeswrong/cli0.17.4 · 1×
@babel/core7.26.10 · 1×
@babel/preset-env7.26.9 · 1×
@babel/preset-react7.26.3 · 1×
@babel/preset-typescript7.24.7 · 1×
@docsearch/css3.9.0 · 1×
@docsearch/react3.9.0 · 1×
@edge-runtime/vm5.0.0 · 1×
@eslint/eslintrc3.1.0 · 1×
@formatjs/fast-memoize3.1.0 · 1×
@formatjs/icu-messageformat-parser3.4.0 · 1×
@formatjs/intl-localematcher0.8.1 · 1×

For agents

$ claude mcp add next-intl \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact