@djangocfg/i18n 2.1.165 → 2.1.166
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 +19 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -33,6 +33,25 @@ function MyComponent() {
|
|
|
33
33
|
}
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
## Subpath Imports (Server Components)
|
|
37
|
+
|
|
38
|
+
For Next.js server components, use subpath imports to avoid React Context issues:
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
// ✅ Server-safe (no React Context)
|
|
42
|
+
import { en, ru, ko } from '@djangocfg/i18n/locales'
|
|
43
|
+
import { mergeTranslations } from '@djangocfg/i18n/utils'
|
|
44
|
+
|
|
45
|
+
// ❌ Client-only (has React Context)
|
|
46
|
+
import { I18nProvider, useT } from '@djangocfg/i18n'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
| Path | Description |
|
|
50
|
+
|------|-------------|
|
|
51
|
+
| `@djangocfg/i18n` | Full package (client components) |
|
|
52
|
+
| `@djangocfg/i18n/locales` | Locale data only (server-safe) |
|
|
53
|
+
| `@djangocfg/i18n/utils` | Utilities like `mergeTranslations` (server-safe) |
|
|
54
|
+
|
|
36
55
|
## CLI
|
|
37
56
|
|
|
38
57
|
Built-in CLI with LLM translation support.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/i18n",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.166",
|
|
4
4
|
"description": "Lightweight i18n library for @djangocfg packages with built-in translations for English, Russian, and Korean",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
"react": "^18.0.0 || ^19.0.0"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@djangocfg/llm": "^2.1.
|
|
75
|
+
"@djangocfg/llm": "^2.1.166",
|
|
76
76
|
"citty": "^0.1.6",
|
|
77
77
|
"consola": "^3.4.0",
|
|
78
78
|
"jiti": "^2.4.2"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
81
|
+
"@djangocfg/typescript-config": "^2.1.166",
|
|
82
82
|
"@types/node": "^25.2.3",
|
|
83
83
|
"@types/react": "^19.1.0",
|
|
84
84
|
"eslint": "^9.37.0",
|