@intlayer/docs 9.0.0-canary.14 → 9.0.0-canary.16
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/dist/cjs/generated/docs.entry.cjs +40 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +40 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +2 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/cli/index.md +1 -1
- package/docs/ar/configuration.md +42 -1
- package/docs/ar/intlayer_CMS.md +5 -128
- package/docs/ar/live-sync.md +174 -0
- package/docs/ar/releases/v9.md +45 -1
- package/docs/bn/cli/index.md +1 -1
- package/docs/bn/configuration.md +45 -1
- package/docs/cs/cli/index.md +1 -1
- package/docs/cs/configuration.md +45 -1
- package/docs/de/cli/index.md +1 -1
- package/docs/de/configuration.md +42 -1
- package/docs/de/intlayer_CMS.md +5 -135
- package/docs/de/live-sync.md +174 -0
- package/docs/de/releases/v9.md +45 -1
- package/docs/en/analytics.md +222 -0
- package/docs/en/cli/index.md +1 -1
- package/docs/en/configuration.md +42 -1
- package/docs/en/intlayer_CMS.md +6 -140
- package/docs/en/live-sync.md +184 -0
- package/docs/en/releases/v9.md +53 -3
- package/docs/en-GB/cli/index.md +1 -1
- package/docs/en-GB/configuration.md +42 -1
- package/docs/en-GB/intlayer_CMS.md +5 -128
- package/docs/en-GB/live-sync.md +173 -0
- package/docs/en-GB/releases/v9.md +45 -1
- package/docs/es/cli/index.md +1 -1
- package/docs/es/configuration.md +42 -1
- package/docs/es/intlayer_CMS.md +5 -140
- package/docs/es/live-sync.md +176 -0
- package/docs/es/releases/v9.md +45 -1
- package/docs/fr/cli/index.md +1 -1
- package/docs/fr/configuration.md +42 -1
- package/docs/fr/intlayer_CMS.md +5 -135
- package/docs/fr/live-sync.md +174 -0
- package/docs/fr/releases/v9.md +45 -1
- package/docs/hi/cli/index.md +1 -1
- package/docs/hi/configuration.md +42 -1
- package/docs/hi/intlayer_CMS.md +5 -128
- package/docs/hi/live-sync.md +174 -0
- package/docs/hi/releases/v9.md +45 -1
- package/docs/id/cli/index.md +1 -1
- package/docs/id/configuration.md +42 -1
- package/docs/id/intlayer_CMS.md +5 -139
- package/docs/id/live-sync.md +185 -0
- package/docs/id/releases/v9.md +45 -1
- package/docs/it/cli/index.md +1 -1
- package/docs/it/configuration.md +42 -1
- package/docs/it/intlayer_CMS.md +5 -128
- package/docs/it/live-sync.md +174 -0
- package/docs/it/releases/v9.md +45 -1
- package/docs/ja/cli/index.md +1 -1
- package/docs/ja/configuration.md +42 -1
- package/docs/ja/intlayer_CMS.md +5 -139
- package/docs/ja/live-sync.md +185 -0
- package/docs/ja/releases/v9.md +45 -1
- package/docs/ko/cli/index.md +1 -1
- package/docs/ko/configuration.md +42 -1
- package/docs/ko/intlayer_CMS.md +5 -141
- package/docs/ko/live-sync.md +187 -0
- package/docs/ko/releases/v9.md +45 -1
- package/docs/nl/cli/index.md +1 -1
- package/docs/nl/configuration.md +45 -1
- package/docs/pl/cli/index.md +1 -1
- package/docs/pl/configuration.md +45 -1
- package/docs/pl/intlayer_CMS.md +5 -139
- package/docs/pl/live-sync.md +185 -0
- package/docs/pl/releases/v9.md +45 -1
- package/docs/pt/cli/index.md +1 -1
- package/docs/pt/configuration.md +45 -1
- package/docs/pt/intlayer_CMS.md +5 -143
- package/docs/pt/live-sync.md +174 -0
- package/docs/pt/releases/v9.md +45 -1
- package/docs/ru/cli/index.md +1 -1
- package/docs/ru/configuration.md +42 -1
- package/docs/ru/intlayer_CMS.md +5 -139
- package/docs/ru/live-sync.md +185 -0
- package/docs/ru/releases/v9.md +45 -1
- package/docs/tr/cli/index.md +1 -1
- package/docs/tr/configuration.md +42 -1
- package/docs/tr/intlayer_CMS.md +5 -127
- package/docs/tr/live-sync.md +173 -0
- package/docs/tr/releases/v9.md +45 -1
- package/docs/uk/cli/index.md +1 -1
- package/docs/uk/configuration.md +42 -1
- package/docs/uk/intlayer_CMS.md +5 -139
- package/docs/uk/live-sync.md +185 -0
- package/docs/uk/releases/v9.md +45 -1
- package/docs/ur/cli/index.md +1 -1
- package/docs/ur/configuration.md +45 -1
- package/docs/vi/cli/index.md +1 -1
- package/docs/vi/configuration.md +42 -1
- package/docs/vi/intlayer_CMS.md +5 -139
- package/docs/vi/live-sync.md +185 -0
- package/docs/vi/releases/v9.md +45 -1
- package/docs/zh/cli/index.md +1 -1
- package/docs/zh/configuration.md +42 -1
- package/docs/zh/intlayer_CMS.md +5 -129
- package/docs/zh/live-sync.md +175 -0
- package/docs/zh/releases/v9.md +45 -1
- package/package.json +7 -7
- package/src/generated/docs.entry.ts +40 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-07-08
|
|
3
|
+
updatedAt: 2026-07-08
|
|
4
|
+
title: Synchronisation en direct (Live Sync) | Reflétez les changements de contenu du CMS en temps réel
|
|
5
|
+
description: Laissez votre application refléter les modifications de contenu du CMS Intlayer en temps réel, sans reconstruction ni redéploiement.
|
|
6
|
+
keywords:
|
|
7
|
+
- Synchronisation en direct
|
|
8
|
+
- Live Sync
|
|
9
|
+
- CMS
|
|
10
|
+
- Éditeur Visuel
|
|
11
|
+
- Internationalisation
|
|
12
|
+
- Documentation
|
|
13
|
+
- Intlayer
|
|
14
|
+
- Next.js
|
|
15
|
+
- Vite
|
|
16
|
+
history:
|
|
17
|
+
- version: 9.0.0
|
|
18
|
+
date: 2026-07-08
|
|
19
|
+
changes: "Déplacé depuis la documentation du CMS Intlayer vers sa propre page"
|
|
20
|
+
- version: 6.0.1
|
|
21
|
+
date: 2025-09-22
|
|
22
|
+
changes: "Ajout de la documentation sur la synchronisation en direct"
|
|
23
|
+
- version: 6.0.0
|
|
24
|
+
date: 2025-09-04
|
|
25
|
+
changes: "Remplacement du champ `hotReload` par `liveSync`"
|
|
26
|
+
author: aymericzip
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Synchronisation en direct
|
|
30
|
+
|
|
31
|
+
La synchronisation en direct permet à votre application de refléter les modifications du contenu CMS en temps réel. Aucune reconstruction ou redéploiement n'est nécessaire. Lorsqu'elle est activée, les mises à jour sont diffusées vers un serveur de synchronisation en direct qui actualise les dictionnaires que votre application utilise.
|
|
32
|
+
|
|
33
|
+
## Table des matières
|
|
34
|
+
|
|
35
|
+
<TOC/>
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Activer la synchronisation en direct
|
|
40
|
+
|
|
41
|
+
> La synchronisation en direct nécessite une connexion continue au serveur et est disponible dans le plan entreprise.
|
|
42
|
+
|
|
43
|
+
Activez la synchronisation en direct en mettant à jour votre configuration Intlayer :
|
|
44
|
+
|
|
45
|
+
```typescript fileName="intlayer.config.ts" codeFormat={["typescript", "esm", "commonjs"]}
|
|
46
|
+
import type { IntlayerConfig } from "intlayer";
|
|
47
|
+
|
|
48
|
+
const config: IntlayerConfig = {
|
|
49
|
+
// ... autres paramètres de configuration
|
|
50
|
+
editor: {
|
|
51
|
+
/**
|
|
52
|
+
* Active le rechargement à chaud des configurations de langue lorsque des modifications sont détectées.
|
|
53
|
+
* Par exemple, lorsqu'un dictionnaire est ajouté ou mis à jour, l'application met à jour
|
|
54
|
+
* le contenu affiché sur la page.
|
|
55
|
+
*
|
|
56
|
+
* Comme le rechargement à chaud nécessite une connexion continue au serveur,
|
|
57
|
+
* il est uniquement disponible pour les clients du plan `enterprise`.
|
|
58
|
+
*
|
|
59
|
+
* Par défaut : false
|
|
60
|
+
*/
|
|
61
|
+
liveSync: true,
|
|
62
|
+
},
|
|
63
|
+
dictionary: {
|
|
64
|
+
/**
|
|
65
|
+
* Contrôle la manière dont les dictionnaires sont importés :
|
|
66
|
+
*
|
|
67
|
+
* - "live" : Les dictionnaires sont récupérés dynamiquement via l'API Live Sync.
|
|
68
|
+
* Remplace useIntlayer par useDictionaryDynamic.
|
|
69
|
+
*
|
|
70
|
+
* Remarque : Le mode live utilise l'API Live Sync pour récupérer les dictionnaires. Si l'appel API
|
|
71
|
+
* échoue, les dictionnaires sont importés dynamiquement.
|
|
72
|
+
* Remarque : Seuls les dictionnaires avec un contenu distant et le drapeau "live" utilisent le mode live.
|
|
73
|
+
* Les autres utilisent le mode dynamique pour des raisons de performance.
|
|
74
|
+
*/
|
|
75
|
+
importMode: "fetch",
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export default config;
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Démarrez le serveur Live Sync pour envelopper votre application :
|
|
83
|
+
|
|
84
|
+
Exemple avec Next.js :
|
|
85
|
+
|
|
86
|
+
```json5 fileName="package.json"
|
|
87
|
+
{
|
|
88
|
+
"scripts": {
|
|
89
|
+
// ... autres scripts
|
|
90
|
+
"build": "next build",
|
|
91
|
+
"dev": "next dev",
|
|
92
|
+
"start": "npx intlayer live --with 'next start'",
|
|
93
|
+
},
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Exemple avec Vite :
|
|
98
|
+
|
|
99
|
+
```json5 fileName="package.json"
|
|
100
|
+
{
|
|
101
|
+
"scripts": {
|
|
102
|
+
// ... autres scripts
|
|
103
|
+
"build": "vite build",
|
|
104
|
+
"dev": "vite dev",
|
|
105
|
+
"start": "npx intlayer live --with 'vite start'",
|
|
106
|
+
},
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Le serveur Live Sync enveloppe votre application et applique automatiquement le contenu mis à jour dès son arrivée.
|
|
111
|
+
|
|
112
|
+
Pour recevoir les notifications de changement depuis le CMS, le serveur Live Sync maintient une connexion SSE avec le backend. Lorsque le contenu change dans le CMS, le backend transmet la mise à jour au serveur Live Sync, qui écrit les nouveaux dictionnaires. Votre application reflétera la mise à jour lors de la prochaine navigation ou du rechargement du navigateur, aucune reconstruction n’est nécessaire.
|
|
113
|
+
|
|
114
|
+
Organigramme (CMS/Backend -> Serveur Live Sync -> Serveur d’application -> Frontend) :
|
|
115
|
+
|
|
116
|
+

|
|
117
|
+
|
|
118
|
+
Comment cela fonctionne :
|
|
119
|
+
|
|
120
|
+

|
|
121
|
+
|
|
122
|
+
## Flux de travail en développement (local)
|
|
123
|
+
|
|
124
|
+
- En développement, tous les dictionnaires distants sont récupérés au démarrage de l'application, ce qui vous permet de tester rapidement les mises à jour.
|
|
125
|
+
- Pour tester Live Sync localement avec Next.js, encapsulez votre serveur de développement :
|
|
126
|
+
|
|
127
|
+
```json5 fileName="package.json"
|
|
128
|
+
{
|
|
129
|
+
"scripts": {
|
|
130
|
+
// ... autres scripts
|
|
131
|
+
"dev": "npx intlayer live --with 'next dev'",
|
|
132
|
+
// "dev": "npx intlayer live --with 'vite dev'", // Pour Vite
|
|
133
|
+
},
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Activez l'optimisation afin qu'Intlayer applique les transformations d'importation Live pendant le développement :
|
|
138
|
+
|
|
139
|
+
```typescript fileName="intlayer.config.ts" codeFormat={["typescript", "esm", "commonjs"]}
|
|
140
|
+
import type { IntlayerConfig } from "intlayer";
|
|
141
|
+
|
|
142
|
+
const config: IntlayerConfig = {
|
|
143
|
+
editor: {
|
|
144
|
+
applicationURL: "http://localhost:5173",
|
|
145
|
+
liveSyncURL: "http://localhost:4000",
|
|
146
|
+
liveSync: true,
|
|
147
|
+
},
|
|
148
|
+
dictionary: {
|
|
149
|
+
importMode: "fetch",
|
|
150
|
+
},
|
|
151
|
+
build: {
|
|
152
|
+
optimize: true,
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export default config;
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Cette configuration encapsule votre serveur de développement avec le serveur Live Sync, récupère les dictionnaires distants au démarrage et diffuse les mises à jour du CMS via SSE. Rafraîchissez la page pour voir les changements.
|
|
160
|
+
|
|
161
|
+
## Notes et contraintes
|
|
162
|
+
|
|
163
|
+
- Ajoutez l'origine du live sync à la politique de sécurité de votre site (CSP). Assurez-vous que l'URL du live sync est autorisée dans `connect-src` (et `frame-ancestors` si pertinent).
|
|
164
|
+
- Live Sync ne fonctionne pas avec une sortie statique. Pour Next.js, la page doit être dynamique pour recevoir les mises à jour à l'exécution (par exemple, utilisez `generateStaticParams`, `generateMetadata`, `getServerSideProps` ou `getStaticProps` de manière appropriée pour éviter les contraintes de statique complète).
|
|
165
|
+
- Dans le CMS, chaque dictionnaire possède un indicateur `live`. Seuls les dictionnaires avec `live=true` sont récupérés via l'API de synchronisation en direct ; les autres sont importés dynamiquement et restent inchangés à l'exécution.
|
|
166
|
+
- L'indicateur `live` est évalué pour chaque dictionnaire au moment de la compilation. Si le contenu distant n'était pas marqué `live=true` lors de la compilation, vous devez recompiler pour activer la synchronisation en direct pour ce dictionnaire.
|
|
167
|
+
- Le serveur de synchronisation en direct doit pouvoir écrire dans `.intlayer`. Dans les conteneurs, assurez-vous d'avoir un accès en écriture à `/.intlayer`.
|
|
168
|
+
|
|
169
|
+
## Liens utiles
|
|
170
|
+
|
|
171
|
+
- [CMS Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/intlayer_CMS.md)
|
|
172
|
+
- [Éditeur Visuel Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/intlayer_visual_editor.md)
|
|
173
|
+
- [Référence de configuration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/configuration.md)
|
|
174
|
+
- [Guide d'auto-hébergement](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/self_hosting.md)
|
package/docs/fr/releases/v9.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2026-06-14
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-07-08
|
|
4
4
|
title: Nouvel Intlayer v9 - Quoi de neuf ?
|
|
5
5
|
description: Découvrez les nouveautés d'Intlayer v9. Présentation des packages de compatibilité prêts à l'emploi pour les bibliothèques i18n populaires et prise en charge des Collections et Variants.
|
|
6
6
|
keywords:
|
|
@@ -201,6 +201,49 @@ const product = useIntlayer("product-copy", {
|
|
|
201
201
|
|
|
202
202
|
---
|
|
203
203
|
|
|
204
|
+
## `@intlayer/analytics` : suivi de l'exposition du contenu et tests A/B
|
|
205
|
+
|
|
206
|
+
Un nouveau package optionnel, [`@intlayer/analytics`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/analytics.md), vous indique quel contenu est réellement affiché à vos visiteurs — et boucle la boucle avec **Collections & Variants** en vous permettant de faire des tests A/B sur le contenu et de mesurer les conversions par variante.
|
|
207
|
+
|
|
208
|
+
- **Suivi au niveau du provider** : `IntlayerProvider` (React / Next.js / React Native) enregistre automatiquement des événements `page_view` au chargement, au changement de route et au changement de langue.
|
|
209
|
+
- **Suivi au niveau du nœud** : chaque résolution de `useIntlayer` remonte un événement `content_exposure` — quelle clé de dictionnaire, quel chemin de clé, quelle langue et, le cas échéant, quelle **variante** A/B a été affichée. Les expositions répétées d'un même nœud dans une fenêtre d'envoi sont regroupées.
|
|
210
|
+
- **Attribution déterministe des variantes A/B** : `getVariant(experimentKey, variants)` attribue une variante à chaque session **sans aller-retour serveur**, donc aucun scintillement avant le premier rendu.
|
|
211
|
+
- **`useConversion()`** : attribue un objectif (inscription, clic, achat…) à la variante à laquelle la session a été exposée.
|
|
212
|
+
- **Coût nul si non installé** : même schéma tree-shakeable que `@intlayer/editor` — `import()` dynamique enveloppé dans un `try/catch`, plus une variable d'environnement à la compilation (`INTLAYER_ANALYTICS_ENABLED`) qui élimine complètement l'intégration du bundle pour les applications qui ne l'activent pas.
|
|
213
|
+
- **Aucun nouveau schéma de configuration** : réutilise `editor.backendURL` (point d'envoi / auto-hébergement) et `editor.clientId` (clé de projet, qui sert aussi d'interrupteur d'activation).
|
|
214
|
+
- **Respect de la vie privée** : hachage anonyme de session (SHA-256, aucun identifiant brut stocké), aucun stockage d'IP, géolocalisation grossière limitée au pays, requêtes envoyées par lots environ toutes les 20 secondes.
|
|
215
|
+
- **Tableau de bord** : une nouvelle page **Analytics** (affichée dans la barre latérale une fois un projet sélectionné) indique les utilisateurs actifs, les utilisateurs du jour, ceux des 7/30/90 derniers jours, un graphique d'évolution des visiteurs, ainsi que la répartition par langue et par localisation.
|
|
216
|
+
|
|
217
|
+
```tsx fileName="CTAButton.tsx" codeFormat="tsx"
|
|
218
|
+
import { useConversion } from "react-intlayer";
|
|
219
|
+
|
|
220
|
+
const CTAButton = () => {
|
|
221
|
+
const trackConversion = useConversion();
|
|
222
|
+
|
|
223
|
+
return (
|
|
224
|
+
<button
|
|
225
|
+
onClick={() =>
|
|
226
|
+
trackConversion({
|
|
227
|
+
experimentKey: "homepage-hero",
|
|
228
|
+
variant: "black_friday",
|
|
229
|
+
goal: "cta_click",
|
|
230
|
+
})
|
|
231
|
+
}
|
|
232
|
+
>
|
|
233
|
+
Get started
|
|
234
|
+
</button>
|
|
235
|
+
);
|
|
236
|
+
};
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
```bash packageManager="npm"
|
|
240
|
+
npm install @intlayer/analytics
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Disponible dès aujourd'hui pour React, Next.js et React Native (via `react-intlayer`) ; les intégrations pour d'autres frameworks (Vue, Svelte, Angular, …) sont prévues, en suivant le même schéma de déploiement que `@intlayer/editor`. Consultez la [documentation Analytics](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/analytics.md) pour le guide complet.
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
204
247
|
## Plugin Vite : Compilateur Bundled & Proxy
|
|
205
248
|
|
|
206
249
|
Le plugin Vite `intlayer()` regroupe maintenant le **compilateur** et le **proxy de routage de locale** directement, donc la plupart des projets n'ont besoin que d'un seul plugin dans `vite.config.ts` :
|
|
@@ -349,6 +392,7 @@ Si vous effectuez une mise à niveau depuis la v8, notez que la v9 n'inclut pas
|
|
|
349
392
|
|
|
350
393
|
- [Guide des packages d'adaptateurs de compatibilité](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/compat/index.md)
|
|
351
394
|
- [Dictionnaires dynamiques - Collections & Variants](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/dynamic_dictionaries/index.md)
|
|
395
|
+
- [Analytics - Suivi de l'exposition du contenu et tests A/B](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/analytics.md)
|
|
352
396
|
- [Référence de configuration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/configuration.md)
|
|
353
397
|
- [SDK CMS - Accès programmatique avec @intlayer/api](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/intlayer_CMS.md)
|
|
354
398
|
- [Guide d'auto-hébergement](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/self_hosting.md)
|
package/docs/hi/cli/index.md
CHANGED
|
@@ -125,7 +125,7 @@ Intlayer कई कॉन्फ़िगरेशन फ़ाइल प्र
|
|
|
125
125
|
|
|
126
126
|
### प्रमाणीकरण (Authentication)
|
|
127
127
|
|
|
128
|
-
- **[Login](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/login.md)** - Intlayer CMS के साथ प्रमाणित हों और एक्सेस क्रेडेंशियल प्राप्त करें
|
|
128
|
+
- **[Login](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/cli/login.md)** - Intlayer CMS के साथ प्रमाणित हों और एक्सेस क्रेडेंशियल प्राप्त करें
|
|
129
129
|
|
|
130
130
|
### मुख्य कमांड (Core Commands)
|
|
131
131
|
|
package/docs/hi/configuration.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-13
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-07-11
|
|
4
4
|
title: कॉन्फ़िगरेशन (Configuration)
|
|
5
5
|
description: जानें कि अपने एप्लिकेशन के लिए Intlayer को कैसे कॉन्फ़िगर करें। Intlayer को अपनी आवश्यकताओं के अनुसार अनुकूलित करने के लिए उपलब्ध विभिन्न सेटिंग्स और विकल्पों को समझें।
|
|
6
6
|
keywords:
|
|
@@ -14,6 +14,9 @@ slugs:
|
|
|
14
14
|
- concept
|
|
15
15
|
- configuration
|
|
16
16
|
history:
|
|
17
|
+
- version: 9.0.0
|
|
18
|
+
date: 2026-07-11
|
|
19
|
+
changes: "`analytics` कॉन्फ़िगरेशन जोड़ा गया"
|
|
17
20
|
- version: 9.0.0
|
|
18
21
|
date: 2026-06-24
|
|
19
22
|
changes: "Add `enableProxy` option to the routing configuration"
|
|
@@ -355,6 +358,30 @@ const config: IntlayerConfig = {
|
|
|
355
358
|
liveSync: true,
|
|
356
359
|
},
|
|
357
360
|
|
|
361
|
+
/**
|
|
362
|
+
* एनालिटिक्स (analytics) कॉन्फ़िगरेशन।
|
|
363
|
+
*/
|
|
364
|
+
analytics: {
|
|
365
|
+
/**
|
|
366
|
+
* क्या एनालिटिक्स संग्रहण सक्षम है (पेज व्यू, कंटेंट एक्सपोज़र, A/B इवेंट्स)।
|
|
367
|
+
* एट्रिब्यूशन के लिए `editor.clientId` सेट होना आवश्यक है।
|
|
368
|
+
* डिफ़ॉल्ट: false
|
|
369
|
+
*/
|
|
370
|
+
enabled: true,
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* बैकएंड को स्वचालित बैच फ़्लश के बीच मिलीसेकंड।
|
|
374
|
+
* डिफ़ॉल्ट: 20000
|
|
375
|
+
*/
|
|
376
|
+
flushInterval: 20000,
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* रिकॉर्ड करने के लिए सत्रों (sessions) का अंश, 0 (कोई नहीं) से 1 (सभी) तक।
|
|
380
|
+
* डिफ़ॉल्ट: 1
|
|
381
|
+
*/
|
|
382
|
+
sampleRate: 1,
|
|
383
|
+
},
|
|
384
|
+
|
|
358
385
|
/**
|
|
359
386
|
* AI का उपयोग करके अनुवाद और जनरेशन के लिए सेटिंग्स।
|
|
360
387
|
*/
|
|
@@ -661,6 +688,20 @@ export default config;
|
|
|
661
688
|
|
|
662
689
|
---
|
|
663
690
|
|
|
691
|
+
### एनालिटिक्स कॉन्फ़िगरेशन (Analytics)
|
|
692
|
+
|
|
693
|
+
Intlayer एनालिटिक्स से संबंधित सेटिंग्स को परिभाषित करता है: उपयोगकर्ताओं को वास्तव में दिखाए जाने वाले कंटेंट (पेज व्यू, कंटेंट एक्सपोज़र) को एकत्र करना और कंटेंट पर A/B परीक्षण को सक्षम बनाना।
|
|
694
|
+
|
|
695
|
+
एनालिटिक्स पूरी तरह से ऑप्ट-इन (opt-in) है: जब तक `analytics.enabled` को स्पष्ट रूप से `true` पर सेट न किया जाए **और** एट्रिब्यूशन के लिए एक प्रोजेक्ट कुंजी (`editor.clientId`) कॉन्फ़िगर न की जाए, तब तक कुछ भी एकत्र नहीं किया जाता। अक्षम होने पर (डिफ़ॉल्ट), संपूर्ण एनालिटिक्स इंटीग्रेशन आपके एप्लिकेशन बंडल से हटा दिया जाता है (dead-code elimination)।
|
|
696
|
+
|
|
697
|
+
| फ़ील्ड | विवरण | प्रकार | डिफ़ॉल्ट | उदाहरण | नोट |
|
|
698
|
+
| --------------- | --------------------------------------------------------------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
699
|
+
| `enabled` | एनालिटिक्स संग्रहण सक्षम करता है (पेज व्यू, कंटेंट एक्सपोज़र, A/B इवेंट्स)। | `boolean` | `false` | `true` | एट्रिब्यूशन के लिए `editor.clientId` सेट होना आवश्यक है; अन्यथा `enabled` के `true` होने पर भी एनालिटिक्स अक्षम रहता है। |
|
|
700
|
+
| `flushInterval` | बैकएंड को स्वचालित बैच फ़्लश के बीच मिलीसेकंड। | `number` | `20000` | `10000` | |
|
|
701
|
+
| `sampleRate` | रिकॉर्ड करने के लिए सत्रों का अंश, `0` (कोई नहीं) से `1` (सभी) तक। | `number` | `1` | `0.5` | सैंपलिंग प्रति सत्र निर्धारक (deterministic) है, इसलिए एक रिकॉर्ड किया गया सत्र अपने सभी इवेंट्स की रिपोर्ट करता है। |
|
|
702
|
+
|
|
703
|
+
---
|
|
704
|
+
|
|
664
705
|
### राउटींग कॉन्फ़िगरेशन (Routing)
|
|
665
706
|
|
|
666
707
|
URL संरचना, लोकेल स्टोरेज और मिडलवेयर प्रबंधन सहित राउटींग व्यवहार को नियंत्रित करने वाली सेटिंग्स।
|
package/docs/hi/intlayer_CMS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2025-08-23
|
|
3
|
-
updatedAt: 2026-
|
|
3
|
+
updatedAt: 2026-07-08
|
|
4
4
|
title: Intlayer CMS | अपने कंटेंट को Intlayer CMS में बाहरीकृत करें
|
|
5
5
|
description: अपने कंटेंट को Intlayer CMS में बाहरीकृत करें ताकि आप अपनी टीम को कंटेंट प्रबंधन सौंप सकें।
|
|
6
6
|
keywords:
|
|
@@ -18,6 +18,9 @@ slugs:
|
|
|
18
18
|
- cms
|
|
19
19
|
youtubeVideo: https://www.youtube.com/watch?v=UDDTnirwi_4
|
|
20
20
|
history:
|
|
21
|
+
- version: 9.0.0
|
|
22
|
+
date: 2026-07-08
|
|
23
|
+
changes: "'लाइव सिंक' सेक्शन को उसके अपने पेज (live-sync.md) पर ले जाया गया, यहां केवल एक संक्षिप्त परिचय और लिंक रखा गया"
|
|
21
24
|
- version: 9.0.0
|
|
22
25
|
date: 2026-06-30
|
|
23
26
|
changes: "स्व-होस्टिंग अनुभाग जोड़ें"
|
|
@@ -248,133 +251,7 @@ bun x intlayer dictionary push -d my-first-dictionary-key --env production
|
|
|
248
251
|
|
|
249
252
|
लाइव सिंक आपकी ऐप को रनटाइम पर CMS सामग्री परिवर्तनों को प्रतिबिंबित करने देता है। पुनर्निर्माण या पुनः तैनाती की आवश्यकता नहीं होती। जब सक्षम किया जाता है, तो अपडेट्स लाइव सिंक सर्वर को स्ट्रीम किए जाते हैं जो आपके एप्लिकेशन द्वारा पढ़े जाने वाले शब्दकोशों को ताज़ा करता है।
|
|
250
253
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
अपने Intlayer कॉन्फ़िगरेशन को अपडेट करके लाइव सिंक सक्षम करें:
|
|
254
|
-
|
|
255
|
-
```typescript fileName="intlayer.config.ts" codeFormat={["typescript", "esm", "commonjs"]}
|
|
256
|
-
import type { IntlayerConfig } from "intlayer";
|
|
257
|
-
|
|
258
|
-
const config: IntlayerConfig = {
|
|
259
|
-
// ... अन्य कॉन्फ़िगरेशन सेटिंग्स
|
|
260
|
-
editor: {
|
|
261
|
-
/**
|
|
262
|
-
* जब परिवर्तन पता चलते हैं तो लोकल कॉन्फ़िगरेशन के हॉट रीलोडिंग को सक्षम करता है।
|
|
263
|
-
* उदाहरण के लिए, जब कोई शब्दकोश जोड़ा या अपडेट किया जाता है, तो एप्लिकेशन
|
|
264
|
-
* पृष्ठ पर प्रदर्शित सामग्री को अपडेट करता है।
|
|
265
|
-
*
|
|
266
|
-
* क्योंकि हॉट रीलोडिंग के लिए सर्वर से निरंतर कनेक्शन आवश्यक है,
|
|
267
|
-
* यह केवल `enterprise` योजना के क्लाइंट्स के लिए उपलब्ध है।
|
|
268
|
-
*
|
|
269
|
-
* डिफ़ॉल्ट: false
|
|
270
|
-
*/
|
|
271
|
-
liveSync: true,
|
|
272
|
-
},
|
|
273
|
-
dictionary: {
|
|
274
|
-
/**
|
|
275
|
-
* नियंत्रित करता है कि शब्दकोश कैसे आयात किए जाते हैं:
|
|
276
|
-
*
|
|
277
|
-
* - "live": शब्दकोश लाइव सिंक API का उपयोग करके गतिशील रूप से प्राप्त किए जाते हैं।
|
|
278
|
-
* useIntlayer को useDictionaryDynamic से प्रतिस्थापित करता है।
|
|
279
|
-
*
|
|
280
|
-
* नोट: लाइव मोड शब्दकोश प्राप्त करने के लिए लाइव सिंक API का उपयोग करता है। यदि API कॉल विफल हो जाती है,
|
|
281
|
-
* तो शब्दकोश गतिशील रूप से आयात किए जाते हैं।
|
|
282
|
-
* नोट: केवल दूरस्थ सामग्री वाले और "live" फ्लैग वाले शब्दकोश लाइव मोड का उपयोग करते हैं।
|
|
283
|
-
* अन्य प्रदर्शन के लिए डायनेमिक मोड का उपयोग करते हैं।
|
|
284
|
-
*/
|
|
285
|
-
importMode: "fetch",
|
|
286
|
-
},
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
export default config;
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
अपने एप्लिकेशन को रैप करने के लिए लाइव सिंक सर्वर शुरू करें:
|
|
293
|
-
|
|
294
|
-
Next.js का उपयोग करने का उदाहरण:
|
|
295
|
-
|
|
296
|
-
```json5 fileName="package.json"
|
|
297
|
-
{
|
|
298
|
-
"scripts": {
|
|
299
|
-
// ... अन्य स्क्रिप्ट्स
|
|
300
|
-
"build": "next build",
|
|
301
|
-
"dev": "next dev",
|
|
302
|
-
"start": "npx intlayer live --with 'next start'",
|
|
303
|
-
},
|
|
304
|
-
}
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
Vite का उपयोग करने का उदाहरण:
|
|
308
|
-
|
|
309
|
-
```json5 fileName="package.json"
|
|
310
|
-
{
|
|
311
|
-
"scripts": {
|
|
312
|
-
// ... अन्य स्क्रिप्ट्स
|
|
313
|
-
"build": "vite build",
|
|
314
|
-
"dev": "vite dev",
|
|
315
|
-
"start": "npx intlayer live --with 'vite start'",
|
|
316
|
-
},
|
|
317
|
-
}
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
लाइव सिंक सर्वर आपके एप्लिकेशन को रैप करता है और जैसे ही अपडेटेड कंटेंट आता है, उसे स्वचालित रूप से लागू करता है।
|
|
321
|
-
|
|
322
|
-
CMS से परिवर्तन सूचनाएँ प्राप्त करने के लिए, Live Sync सर्वर बैकएंड के साथ एक SSE कनेक्शन बनाए रखता है। जब CMS में सामग्री बदलती है, तो बैकएंड अपडेट को Live Sync सर्वर को अग्रेषित करता है, जो नए शब्दकोश लिखता है। आपका एप्लिकेशन अगले नेविगेशन या ब्राउज़र रीलोड पर अपडेट को प्रतिबिंबित करेगा, कोई पुनर्निर्माण आवश्यक नहीं है।
|
|
323
|
-
|
|
324
|
-
फ्लो चार्ट (CMS/बैकएंड -> Live Sync सर्वर -> एप्लिकेशन सर्वर -> फ्रंटेंड):
|
|
325
|
-
|
|
326
|
-

|
|
327
|
-
|
|
328
|
-
यह कैसे काम करता है:
|
|
329
|
-
|
|
330
|
-

|
|
331
|
-
|
|
332
|
-
### विकास कार्यप्रवाह (स्थानीय)
|
|
333
|
-
|
|
334
|
-
- विकास में, जब एप्लिकेशन शुरू होता है तो सभी रिमोट शब्दकोश प्राप्त किए जाते हैं, ताकि आप जल्दी से अपडेट का परीक्षण कर सकें।
|
|
335
|
-
- Next.js के साथ स्थानीय रूप से Live Sync का परीक्षण करने के लिए, अपने dev सर्वर को इस प्रकार लपेटें:
|
|
336
|
-
|
|
337
|
-
```json5 fileName="package.json"
|
|
338
|
-
{
|
|
339
|
-
"scripts": {
|
|
340
|
-
// ... अन्य स्क्रिप्ट्स
|
|
341
|
-
"dev": "npx intlayer live --with 'next dev'",
|
|
342
|
-
// "dev": "npx intlayer live --with 'vite dev'", // Vite के लिए
|
|
343
|
-
},
|
|
344
|
-
}
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
विकास के दौरान Intlayer लाइव इम्पोर्ट ट्रांसफ़ॉर्मेशन लागू करने के लिए ऑप्टिमाइज़ेशन सक्षम करें:
|
|
348
|
-
|
|
349
|
-
```typescript fileName="intlayer.config.ts" codeFormat={["typescript", "esm", "commonjs"]}
|
|
350
|
-
import type { IntlayerConfig } from "intlayer";
|
|
351
|
-
|
|
352
|
-
const config: IntlayerConfig = {
|
|
353
|
-
editor: {
|
|
354
|
-
applicationURL: "http://localhost:5173",
|
|
355
|
-
liveSyncURL: "http://localhost:4000",
|
|
356
|
-
liveSync: true,
|
|
357
|
-
},
|
|
358
|
-
dictionary: {
|
|
359
|
-
importMode: "fetch",
|
|
360
|
-
},
|
|
361
|
-
build: {
|
|
362
|
-
optimize: true,
|
|
363
|
-
},
|
|
364
|
-
};
|
|
365
|
-
|
|
366
|
-
export default config;
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
यह सेटअप आपके डेवलपमेंट सर्वर को लाइव सिंक सर्वर के साथ लपेटता है, स्टार्टअप पर रिमोट डिक्शनरीज़ को प्राप्त करता है, और CMS से SSE के माध्यम से अपडेट्स को स्ट्रीम करता है। परिवर्तनों को देखने के लिए पेज को रिफ्रेश करें।
|
|
370
|
-
|
|
371
|
-
नोट्स और प्रतिबंध:
|
|
372
|
-
|
|
373
|
-
- अपने साइट सुरक्षा नीति (CSP) में लाइव सिंक ओरिजिन को जोड़ें। सुनिश्चित करें कि `connect-src` (और यदि प्रासंगिक हो तो `frame-ancestors`) में लाइव सिंक URL की अनुमति हो।
|
|
374
|
-
- लाइव सिंक स्थैतिक आउटपुट के साथ काम नहीं करता। Next.js के लिए, पेज को रनटाइम पर अपडेट प्राप्त करने के लिए डायनामिक होना चाहिए (जैसे, पूर्ण स्थैतिक-केवल प्रतिबंधों से बचने के लिए `generateStaticParams`, `generateMetadata`, `getServerSideProps`, या `getStaticProps` का उपयुक्त उपयोग करें)।
|
|
375
|
-
- CMS में, प्रत्येक शब्दकोश में एक `live` फ़्लैग होता है। केवल वे शब्दकोश जिनका `live=true` होता है, उन्हें लाइव सिंक API के माध्यम से प्राप्त किया जाता है; अन्य शब्दकोश गतिशील रूप से आयात किए जाते हैं और रनटाइम में अपरिवर्तित रहते हैं।
|
|
376
|
-
- `live` फ़्लैग प्रत्येक शब्दकोश के लिए बिल्ड समय पर मूल्यांकित किया जाता है। यदि बिल्ड के दौरान रिमोट सामग्री को `live=true` के रूप में चिह्नित नहीं किया गया था, तो उस शब्दकोश के लिए लाइव सिंक सक्षम करने के लिए आपको पुनः बिल्ड करना होगा।
|
|
377
|
-
- लाइव सिंक सर्वर को `.intlayer` में लिखने में सक्षम होना चाहिए। कंटेनरों में, `/.intlayer` पर लिखने की अनुमति सुनिश्चित करें।
|
|
254
|
+
पूर्ण सेटअप गाइड (सक्षम करना, Live Sync सर्वर शुरू करना, स्थानीय विकास वर्कफ़्लो, और सीमाओं) के लिए, [Live Sync दस्तावेज़](https://github.com/aymericzip/intlayer/blob/main/docs/docs/hi/live-sync.md) देखें।
|
|
378
255
|
|
|
379
256
|
## स्व-होस्टिंग (Self-Hosting)
|
|
380
257
|
|