# intl

Request-scoped language: responsibilities, supported exports and extension points.

## Purpose [#purpose]

Shared i18next configuration recognizes English, German and French. The server creates a request-scoped instance; web and native supply their own resources. On the web a public page's language is its path (`/de/privacy`); every other page follows the locale cookie, then the default. `locale.config.ts` is the leaf that names the languages, their URL slugs and translated segments ([Internationalization](/docs/features/i18n)).

## Public exports [#public-exports]

| Subpath           | Target                   |
| ----------------- | ------------------------ |
| `.`               | `./src/index.ts`         |
| `./server`        | `./src/server.ts`        |
| `./locale.config` | `./src/locale.config.ts` |

These paths come from `packages/intl/package.json`. A `.` entry is the package root. Conditional targets distinguish platform or type resolution; consumers should import the subpath, not its source file.

## How to extend [#how-to-extend]

Add a message to all three catalogs and use the typed translation API. Keep shared locale constants separate from the server entry. Use Intl for user-visible dates and numbers.

Read the [request-scoped language guide](/docs/features/i18n) for the full flow.

## Key files [#key-files]

- [`packages/intl/package.json`](https://github.com/CarlosZiegler/template-cloudflare/blob/main/packages/intl/package.json)

