@entifix/next-i18n 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/package.json +4 -3
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @entifix/next-i18n
|
|
2
|
+
|
|
3
|
+
Locale routing and server-side translation for a Next.js app. The locale lives in the URL — `/es/catalog` — so a page can be shared in the language it was read in. An unprefixed request is negotiated from the cookie, then `Accept-Language`, and redirected; a prefixed one is rewritten so the rest of the app never sees the prefix.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add @entifix/next-i18n next
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Entry points
|
|
12
|
+
|
|
13
|
+
| Import | What it holds |
|
|
14
|
+
| --------------------------- | -------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `@entifix/next-i18n` | `resolveLocale`, `rewriteToLocale`, `rememberLocale` — for middleware |
|
|
16
|
+
| `@entifix/next-i18n/server` | `getRequestLocale`, `getServerT`, `getServerTranslateKey` — for server components and routes |
|
|
17
|
+
|
|
18
|
+
## Optional peers
|
|
19
|
+
|
|
20
|
+
Install these only if you use what needs them.
|
|
21
|
+
|
|
22
|
+
| Peer | Needed by |
|
|
23
|
+
| --------- | --------------------------- |
|
|
24
|
+
| `i18next` | `@entifix/next-i18n/server` |
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
Tier 4 (app framework) of entifix — a package depends only on its own tier or below. See [the tiers](https://github.com/r10c-technologies/entifix#the-tiers-and-what-you-are-allowed-to-install). MIT licensed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entifix/next-i18n",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Next.js locale routing and server-side translation for @entifix/i18n, with the locale carried in the URL prefix.",
|
|
4
5
|
"license": "MIT",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
@@ -60,8 +61,8 @@
|
|
|
60
61
|
},
|
|
61
62
|
"dependencies": {
|
|
62
63
|
"@swc/helpers": "0.5.23",
|
|
63
|
-
"@entifix/i18n": "0.1.
|
|
64
|
-
"@entifix/core": "0.1.
|
|
64
|
+
"@entifix/i18n": "0.1.1",
|
|
65
|
+
"@entifix/core": "0.1.1"
|
|
65
66
|
},
|
|
66
67
|
"peerDependencies": {
|
|
67
68
|
"next": ">=16",
|