@gschz/astro-plugin-i18n 0.3.7-rc.0
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/LICENSE +21 -0
- package/README.md +348 -0
- package/dist/components/I18nText.astro +38 -0
- package/dist/components/LangToggle.d.ts +14 -0
- package/dist/components/LangToggle.js +309 -0
- package/dist/components/LangToggle.js.map +1 -0
- package/dist/components/TranslatedText.d.ts +13 -0
- package/dist/components/TranslatedText.js +185 -0
- package/dist/components/TranslatedText.js.map +1 -0
- package/dist/index-Dyxmdid5.d.ts +32 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.js +828 -0
- package/dist/index.js.map +1 -0
- package/dist/integration.d.ts +10 -0
- package/dist/integration.js +347 -0
- package/dist/integration.js.map +1 -0
- package/dist/middleware-entrypoint.d.ts +14 -0
- package/dist/middleware-entrypoint.js +61 -0
- package/dist/middleware-entrypoint.js.map +1 -0
- package/package.json +92 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Gera Schz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
# astro-plugin-i18n
|
|
2
|
+
|
|
3
|
+
Plugin de internacionalización (i18n) para Astro, enfocado en la simplicidad y el rendimiento.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@hkxdv/astro-plugin-i18n)
|
|
6
|
+
[](https://github.com/hkxdv/astro-plugin-i18n/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
## Estado del Proyecto
|
|
9
|
+
|
|
10
|
+
Este paquete fue reconstruido a partir de las versiones previamente publicadas en NPM bajo `@hkxdv/astro-plugin-i18n`, recuperando su API, componentes y flujo de integración para poder continuar su mantenimiento.
|
|
11
|
+
|
|
12
|
+
Las próximas publicaciones se realizarán desde la cuenta `gschz`. La intención es mantener compatibilidad con la API pública recuperada y estabilizar el paquete antes de su nueva publicación.
|
|
13
|
+
|
|
14
|
+
## Motivación
|
|
15
|
+
|
|
16
|
+
¿Por qué otro plugin de i18n para Astro? Este plugin fue creado con el objetivo de ofrecer una solución **simple, eficiente y fácil de integrar**, abordando algunas complejidades encontradas en otras herramientas y enfocándose en una experiencia de desarrollador fluida.
|
|
17
|
+
|
|
18
|
+
## Características
|
|
19
|
+
|
|
20
|
+
- **Configuración Obligatoria Simplificada**: Configura idiomas y opciones a través de la integración de Astro.
|
|
21
|
+
- **Fácil de usar**: Archivos JSON estándar para las traducciones.
|
|
22
|
+
- **Componentes Incluidos**: Componentes listos para usar en Astro (`.astro`) y React (`.tsx`).
|
|
23
|
+
- **Sin FOUC (Flash of Untranslated Content)**: Renderiza el texto traducido inicial en el servidor.
|
|
24
|
+
- **TypeScript**: Soporte completo con tipos generados automáticamente para las claves de traducción (opcional).
|
|
25
|
+
- **Detección Automática**: Detecta el idioma preferido del usuario (localStorage, navegador) en el cliente.
|
|
26
|
+
- **Flexible**: Funciona con o sin React.
|
|
27
|
+
|
|
28
|
+
## Instalación
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
bun add @hkxdv/astro-plugin-i18n
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Para instalar una versión de prueba publicada en NPM (canal `next`):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
bun add @hkxdv/astro-plugin-i18n@next
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Si estás probando localmente antes de publicar:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
bun add ../astro-plugin-i18n
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Flujo recomendado de publicación (pruebas)
|
|
47
|
+
|
|
48
|
+
Antes de publicar una versión estable (`latest`), se recomienda publicar una release candidata en `next`, probarla en un proyecto consumidor real (por ejemplo `test-i18n`) y corregir incidencias antes de promoverla.
|
|
49
|
+
|
|
50
|
+
1. Generar siguiente versión `rc`:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
bun run version:rc
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
2. Publicar al canal de pruebas (`next`):
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
bun run publish:next
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
3. Instalar esa versión en el proyecto de prueba:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# dentro del proyecto consumidor
|
|
66
|
+
bun add @hkxdv/astro-plugin-i18n@next
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
4. Validar `dev`, `build` y comportamiento de i18n en cliente/SSR.
|
|
70
|
+
|
|
71
|
+
5. Promover a estable cuando esté listo:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
bun run publish:latest
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Configuración (Obligatoria con Integración)
|
|
78
|
+
|
|
79
|
+
Este plugin **requiere** configuración a través de la integración de Astro en `astro.config.mjs`.
|
|
80
|
+
|
|
81
|
+
```javascript
|
|
82
|
+
// astro.config.mjs
|
|
83
|
+
import { defineConfig } from "astro/config";
|
|
84
|
+
import i18n from "@hkxdv/astro-plugin-i18n/integration";
|
|
85
|
+
// Opcional: importa tu integración de React si la usas
|
|
86
|
+
// import react from "@astrojs/react";
|
|
87
|
+
|
|
88
|
+
export default defineConfig({
|
|
89
|
+
integrations: [
|
|
90
|
+
// react(), // Si usas React
|
|
91
|
+
i18n({
|
|
92
|
+
// --- Opciones Requeridas ---
|
|
93
|
+
defaultLang: "es", // Idioma por defecto de tu sitio
|
|
94
|
+
supportedLangs: ["es", "en"], // Lista de idiomas soportados (debe incluir defaultLang)
|
|
95
|
+
|
|
96
|
+
// --- Opciones Opcionales ---
|
|
97
|
+
translationsDir: "./src/i18n", // Directorio de traducciones (relativo a la raíz)
|
|
98
|
+
autoDetect: true, // Detectar idioma del navegador como fallback
|
|
99
|
+
generateTypes: true, // Generar tipos para claves de traducción
|
|
100
|
+
typesOutputPath: "./src/types/i18n-types.d.ts", // Dónde guardar los tipos generados
|
|
101
|
+
missingKeyStrategy: "key", // Qué hacer si falta una clave ('key', 'empty', 'error')
|
|
102
|
+
}),
|
|
103
|
+
],
|
|
104
|
+
});
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Importante:**
|
|
108
|
+
|
|
109
|
+
- `defaultLang` y `supportedLangs` son **obligatorias**.
|
|
110
|
+
- El `defaultLang` debe estar incluido en `supportedLangs`.
|
|
111
|
+
|
|
112
|
+
## Uso Rápido
|
|
113
|
+
|
|
114
|
+
### 1. Crear Archivos de Traducción
|
|
115
|
+
|
|
116
|
+
Crea un directorio (por defecto `src/i18n`) con tus archivos de traducción en formato JSON. El nombre de cada archivo debe ser el código del idioma (ej. `es.json`, `en.json`).
|
|
117
|
+
|
|
118
|
+
```json
|
|
119
|
+
// src/i18n/es.json
|
|
120
|
+
{
|
|
121
|
+
"welcome": "Bienvenido a mi sitio",
|
|
122
|
+
"nav": {
|
|
123
|
+
"home": "Inicio",
|
|
124
|
+
"about": "Acerca de"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
// src/i18n/en.json
|
|
131
|
+
{
|
|
132
|
+
"welcome": "Welcome to my site",
|
|
133
|
+
"nav": {
|
|
134
|
+
"home": "Home",
|
|
135
|
+
"about": "About"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 2. Inicializar el Idioma en el Cliente
|
|
141
|
+
|
|
142
|
+
En tu layout principal (ej. `src/layouts/Layout.astro`), añade un script para inicializar el estado del idioma en el cliente. Esto es crucial para la detección de preferencias del usuario y cambios dinámicos.
|
|
143
|
+
|
|
144
|
+
```astro
|
|
145
|
+
{/* src/layouts/Layout.astro */}
|
|
146
|
+
---
|
|
147
|
+
// Puedes obtener el idioma actual en el servidor si lo necesitas
|
|
148
|
+
import { getCurrentLanguage, getTranslationsForLanguage } from '@hkxdv/astro-plugin-i18n';
|
|
149
|
+
const serverLang = getCurrentLanguage(); // Obtendrá el idioma por defecto aquí
|
|
150
|
+
const initialTranslations = await getTranslationsForLanguage(serverLang);
|
|
151
|
+
---
|
|
152
|
+
<html lang={serverLang}>
|
|
153
|
+
<head>
|
|
154
|
+
{/* ... otras etiquetas ... */}
|
|
155
|
+
|
|
156
|
+
{/* Script para inyectar estado inicial (Optimización FOUC) */}
|
|
157
|
+
<script define:vars={{ currentLang: serverLang, initialTranslations: initialTranslations || {} }}>
|
|
158
|
+
window.__INITIAL_I18N_STATE__ = {
|
|
159
|
+
lang: currentLang,
|
|
160
|
+
translations: initialTranslations,
|
|
161
|
+
};
|
|
162
|
+
</script>
|
|
163
|
+
</head>
|
|
164
|
+
<body>
|
|
165
|
+
<slot /> {/* Contenido de la página */}
|
|
166
|
+
|
|
167
|
+
{/* Script Principal del Cliente */}
|
|
168
|
+
<script>
|
|
169
|
+
import { setupLanguage } from "@hkxdv/astro-plugin-i18n";
|
|
170
|
+
|
|
171
|
+
// Inicializa el idioma en el cliente.
|
|
172
|
+
// Usará __INITIAL_I18N_STATE__, luego localStorage, luego navegador (si autoDetect=true)
|
|
173
|
+
// y aplicará el idioma correcto.
|
|
174
|
+
setupLanguage();
|
|
175
|
+
</script>
|
|
176
|
+
</body>
|
|
177
|
+
</html>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### 3. Usar Componentes de Traducción
|
|
181
|
+
|
|
182
|
+
#### Componente Astro (`I18nText.astro`)
|
|
183
|
+
|
|
184
|
+
```astro
|
|
185
|
+
{/* En cualquier página .astro */}
|
|
186
|
+
---
|
|
187
|
+
import I18nText from '@hkxdv/astro-plugin-i18n/components/I18nText.astro';
|
|
188
|
+
---
|
|
189
|
+
<h1><I18nText key="welcome" /></h1>
|
|
190
|
+
|
|
191
|
+
<nav>
|
|
192
|
+
<a href="/"><I18nText key="nav.home" /></a>
|
|
193
|
+
<a href="/about"><I18nText key="nav.about" /></a>
|
|
194
|
+
</nav>
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
#### Componente React (`TranslatedText.tsx`)
|
|
198
|
+
|
|
199
|
+
Necesitas tener la integración de React configurada.
|
|
200
|
+
|
|
201
|
+
```jsx
|
|
202
|
+
// En un componente .jsx o .tsx (recuerda añadir client:load o similar en Astro)
|
|
203
|
+
import TranslatedText from "@hkxdv/astro-plugin-i18n/components/TranslatedText";
|
|
204
|
+
|
|
205
|
+
function MyReactComponent() {
|
|
206
|
+
return (
|
|
207
|
+
<div>
|
|
208
|
+
<h1>
|
|
209
|
+
<TranslatedText textKey="welcome" />
|
|
210
|
+
</h1>
|
|
211
|
+
<nav>
|
|
212
|
+
<a href="/">
|
|
213
|
+
<TranslatedText textKey="nav.home" />
|
|
214
|
+
</a>
|
|
215
|
+
<a href="/about">
|
|
216
|
+
<TranslatedText textKey="nav.about" />
|
|
217
|
+
</a>
|
|
218
|
+
</nav>
|
|
219
|
+
</div>
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## API
|
|
225
|
+
|
|
226
|
+
### Componentes
|
|
227
|
+
|
|
228
|
+
- **`I18nText.astro`**: Muestra texto traducido en componentes Astro. Renderiza en el servidor.
|
|
229
|
+
- Props: `key` (obligatoria), `values`, `lang`, `element`, `class`, ...otros atributos HTML.
|
|
230
|
+
|
|
231
|
+
```astro
|
|
232
|
+
<I18nText key="welcome" element="h1" class="title" />
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
- **`TranslatedText`** (`.tsx`): Componente React para mostrar texto traducido. Se actualiza dinámicamente con los cambios de idioma.
|
|
236
|
+
- Props: `textKey` (obligatoria), `values`, `lang`, `as` (elemento/componente a renderizar), ...otros atributos HTML.
|
|
237
|
+
|
|
238
|
+
```jsx
|
|
239
|
+
<TranslatedText textKey="welcome" as="h1" className="title" />
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
- **`LangToggle`** (`.tsx`): Componente React que renderiza un `<select>` para cambiar el idioma.
|
|
243
|
+
- Props: `languages` (obligatoria: `Array<{code: string, label: string}>`), `className`, `currentLang`.
|
|
244
|
+
|
|
245
|
+
```jsx
|
|
246
|
+
// Necesitas pasar la lista de idiomas
|
|
247
|
+
const availableLanguages = [
|
|
248
|
+
{ code: "es", label: "Español" },
|
|
249
|
+
{ code: "en", label: "English" },
|
|
250
|
+
];
|
|
251
|
+
|
|
252
|
+
<LangToggle languages={availableLanguages} client:load />;
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Nota: en la implementación actual recuperada, `LangToggle` renderiza un dropdown personalizado con botones, no un `<select>` nativo.
|
|
256
|
+
|
|
257
|
+
### Funciones
|
|
258
|
+
|
|
259
|
+
- **`t(key, options)`**: (Cliente/Servidor) Función síncrona principal para obtener una traducción. En el cliente usa una caché interna poblada al inicio. En el servidor/build usa `getTranslation`.
|
|
260
|
+
|
|
261
|
+
```javascript
|
|
262
|
+
import { t } from "@hkxdv/astro-plugin-i18n";
|
|
263
|
+
const text = t("welcome"); // Síncrono
|
|
264
|
+
const textWithVar = t("greeting", { values: { name: "Astro" } });
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
- **`getCurrentLanguage()`**: (Cliente/Servidor) Obtiene el código del idioma actual detectado. En el servidor siempre devolverá el `defaultLang`.
|
|
268
|
+
|
|
269
|
+
```javascript
|
|
270
|
+
import { getCurrentLanguage } from "@hkxdv/astro-plugin-i18n";
|
|
271
|
+
const lang = getCurrentLanguage(); // "es", "en", etc.
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
- **`changeLanguage(lang)`**: (Cliente) Cambia el idioma de la aplicación, actualiza `localStorage` y dispara el evento `languagechange`.
|
|
275
|
+
|
|
276
|
+
```javascript
|
|
277
|
+
import { changeLanguage } from "@hkxdv/astro-plugin-i18n";
|
|
278
|
+
changeLanguage("en");
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
- **`setupLanguage()`**: (Cliente) Función **esencial** para llamar en un script de cliente (preferiblemente en el layout). Inicializa el estado del idioma detectando preferencias y aplicando el idioma correcto.
|
|
282
|
+
|
|
283
|
+
```javascript
|
|
284
|
+
// En <script> de tu layout
|
|
285
|
+
import { setupLanguage } from "@hkxdv/astro-plugin-i18n";
|
|
286
|
+
setupLanguage();
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
- **`useTranslation()`**: (React Hook) Hook para usar dentro de componentes React. Proporciona `language` (estado reactivo), `t` (vinculada al idioma actual) y `changeLanguage`.
|
|
290
|
+
|
|
291
|
+
```jsx
|
|
292
|
+
import { useTranslation } from "@hkxdv/astro-plugin-i18n";
|
|
293
|
+
|
|
294
|
+
function MyComponent() {
|
|
295
|
+
const { t, language, changeLanguage } = useTranslation();
|
|
296
|
+
return (
|
|
297
|
+
<div>
|
|
298
|
+
<p>{t("welcome")}</p>
|
|
299
|
+
<button onClick={() => changeLanguage("en")}>English</button>
|
|
300
|
+
</div>
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
- **`getTranslationsForLanguage(lang)`**: (Server/Build) Carga y devuelve _todas_ las traducciones para un idioma desde su archivo JSON. Útil en el servidor para inyectar estado inicial.
|
|
306
|
+
- **`getTranslation(key, lang)`**: (Server/Build) Obtiene una _única_ traducción de forma asíncrona desde el archivo JSON.
|
|
307
|
+
- **`translateAsync(key, options)`**: (Server/Build) Similar a `getTranslation` pero permite pasar `values`.
|
|
308
|
+
|
|
309
|
+
## Ejemplos Avanzados
|
|
310
|
+
|
|
311
|
+
### Variables en Traducciones
|
|
312
|
+
|
|
313
|
+
Define placeholders en tu JSON:
|
|
314
|
+
|
|
315
|
+
```jsonc
|
|
316
|
+
// es.json
|
|
317
|
+
{
|
|
318
|
+
"greeting": "Hola {name}, tienes {count} mensajes nuevos.",
|
|
319
|
+
}
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
Usa la opción `values`:
|
|
323
|
+
|
|
324
|
+
```astro
|
|
325
|
+
<I18nText key="greeting" values={{ name: "Gera", count: 3 }} />
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
```jsx
|
|
329
|
+
<TranslatedText textKey="greeting" values={{ name: "Gera", count: 3 }} />
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
```javascript
|
|
333
|
+
const message = t("greeting", { values: { name: "Gera", count: 3 } });
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Elementos HTML Personalizados
|
|
337
|
+
|
|
338
|
+
Con `I18nText`:
|
|
339
|
+
|
|
340
|
+
```astro
|
|
341
|
+
<I18nText key="welcome" element="h1" class="text-2xl font-bold" />
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Con `TranslatedText`:
|
|
345
|
+
|
|
346
|
+
```jsx
|
|
347
|
+
<TranslatedText textKey="welcome" as="h1" className="text-2xl font-bold" />
|
|
348
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { getCurrentLanguage } from "@hkxdv/astro-plugin-i18n";
|
|
3
|
+
import { translateAsync } from "@hkxdv/astro-plugin-i18n";
|
|
4
|
+
import type { TranslationKey } from "@hkxdv/astro-plugin-i18n";
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
key: TranslationKey;
|
|
8
|
+
lang?: string;
|
|
9
|
+
values?: Record<string, string | number | boolean>;
|
|
10
|
+
class?: string;
|
|
11
|
+
element?:
|
|
12
|
+
| "span"
|
|
13
|
+
| "div"
|
|
14
|
+
| "p"
|
|
15
|
+
| "h1"
|
|
16
|
+
| "h2"
|
|
17
|
+
| "h3"
|
|
18
|
+
| "h4"
|
|
19
|
+
| "h5"
|
|
20
|
+
| "h6"
|
|
21
|
+
| "label";
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const {
|
|
26
|
+
key,
|
|
27
|
+
lang,
|
|
28
|
+
values,
|
|
29
|
+
element: Element = "span",
|
|
30
|
+
class: className,
|
|
31
|
+
...rest
|
|
32
|
+
} = Astro.props;
|
|
33
|
+
|
|
34
|
+
const targetLang = lang || getCurrentLanguage(Astro.locals);
|
|
35
|
+
const translatedText = await translateAsync(key, { lang: targetLang, values });
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
<Element class={className} {...rest}>{translatedText}</Element>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { L as Language } from '../index-Dyxmdid5.js';
|
|
3
|
+
|
|
4
|
+
interface LangToggleProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
languages: Array<{
|
|
7
|
+
code: Language;
|
|
8
|
+
label: string;
|
|
9
|
+
}>;
|
|
10
|
+
currentLang?: Language;
|
|
11
|
+
}
|
|
12
|
+
declare const LangToggle: React.FC<LangToggleProps>;
|
|
13
|
+
|
|
14
|
+
export { LangToggle, LangToggle as default };
|