@i18n-micro/astro 1.3.13 → 1.3.18
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/client/index.js +6 -17
- package/dist/client/preact.js +35 -64
- package/dist/client/react.js +35 -64
- package/dist/client/svelte.js +60 -62
- package/dist/client/vue.js +2 -1552
- package/dist/core-DwkpOV-H.cjs +1 -0
- package/dist/core-VSnkGRWR.js +28 -0
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +498 -564
- package/dist/vue-BVFyDsja.cjs +5 -0
- package/dist/vue-CyIbewNw.js +1723 -0
- package/package.json +11 -11
- package/dist/core-B-Ia_nzr.cjs +0 -1
- package/dist/core-Bk6qZuDf.js +0 -37
package/dist/index.mjs
CHANGED
|
@@ -1,591 +1,525 @@
|
|
|
1
|
-
import { BaseI18n as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
class
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
this.helper.loadTranslations(a, l);
|
|
87
|
-
}
|
|
1
|
+
import { BaseI18n as e, FormatService as t, defaultPlural as n, interpolate as r } from "@i18n-micro/core";
|
|
2
|
+
import { AsyncLocalStorage as i } from "node:async_hooks";
|
|
3
|
+
import { existsSync as a, readFileSync as o, readdirSync as s, statSync as c } from "node:fs";
|
|
4
|
+
import { join as l, relative as u, resolve as d, sep as f } from "node:path";
|
|
5
|
+
import { mergeRouteTranslationsWithRoot as p, storeLoadedTranslationFile as m } from "@i18n-micro/utils/parse-path";
|
|
6
|
+
import { detectLocaleFromAcceptLanguage as h } from "@i18n-micro/utils/accept-language";
|
|
7
|
+
//#region src/composer.ts
|
|
8
|
+
var g = class t extends e {
|
|
9
|
+
constructor(e) {
|
|
10
|
+
let t = e._storage || { translations: /* @__PURE__ */ new Map() };
|
|
11
|
+
if (super({
|
|
12
|
+
storage: t,
|
|
13
|
+
plural: e.plural,
|
|
14
|
+
missingWarn: e.missingWarn,
|
|
15
|
+
missingHandler: e.missingHandler,
|
|
16
|
+
numberFormats: e.numberFormats,
|
|
17
|
+
datetimeFormats: e.datetimeFormats
|
|
18
|
+
}), this.initialMessages = {}, this.storage = t, this._locale = e.locale, this._fallbackLocale = e.fallbackLocale || e.locale, this._currentRoute = "index", e.messages) {
|
|
19
|
+
this.initialMessages = { ...e.messages };
|
|
20
|
+
for (let [t, n] of Object.entries(e.messages)) this.helper.loadTranslations(t, n);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
cloneStorage(e) {
|
|
24
|
+
let t = /* @__PURE__ */ new Map();
|
|
25
|
+
for (let [n, r] of e.translations) t.set(n, { ...r });
|
|
26
|
+
return { translations: t };
|
|
27
|
+
}
|
|
28
|
+
clone(e) {
|
|
29
|
+
let n = this.cloneStorage(this.storage);
|
|
30
|
+
return new t({
|
|
31
|
+
locale: e || this._locale,
|
|
32
|
+
fallbackLocale: this._fallbackLocale,
|
|
33
|
+
plural: this.pluralFunc,
|
|
34
|
+
missingWarn: this.missingWarn,
|
|
35
|
+
missingHandler: this.missingHandler,
|
|
36
|
+
numberFormats: this.formatter.getNumberFormats(),
|
|
37
|
+
datetimeFormats: this.formatter.getDateTimeFormats(),
|
|
38
|
+
_storage: n
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
get locale() {
|
|
42
|
+
return this._locale;
|
|
43
|
+
}
|
|
44
|
+
set locale(e) {
|
|
45
|
+
this._locale = e;
|
|
46
|
+
}
|
|
47
|
+
get fallbackLocale() {
|
|
48
|
+
return this._fallbackLocale;
|
|
49
|
+
}
|
|
50
|
+
set fallbackLocale(e) {
|
|
51
|
+
this._fallbackLocale = e;
|
|
52
|
+
}
|
|
53
|
+
setRoute(e) {
|
|
54
|
+
this._currentRoute = e;
|
|
55
|
+
}
|
|
56
|
+
getLocale() {
|
|
57
|
+
return this._locale;
|
|
58
|
+
}
|
|
59
|
+
getFallbackLocale() {
|
|
60
|
+
return this._fallbackLocale;
|
|
61
|
+
}
|
|
62
|
+
getRoute() {
|
|
63
|
+
return this._currentRoute;
|
|
64
|
+
}
|
|
65
|
+
getRouteTranslations(e, t) {
|
|
66
|
+
let n = `${e}:${t}`;
|
|
67
|
+
return this.storage.translations.get(n) ?? null;
|
|
68
|
+
}
|
|
69
|
+
addTranslations(e, t, n = !0) {
|
|
70
|
+
super.loadTranslationsCore(e, t, n);
|
|
71
|
+
}
|
|
72
|
+
addRouteTranslations(e, t, n, r = !0) {
|
|
73
|
+
super.loadRouteTranslationsCore(e, t, n, r);
|
|
74
|
+
}
|
|
75
|
+
mergeTranslations(e, t, n) {
|
|
76
|
+
this.helper.mergeTranslation(e, t, n, !0);
|
|
77
|
+
}
|
|
78
|
+
clearCache() {
|
|
79
|
+
let e = { ...this.initialMessages };
|
|
80
|
+
if (super.clearCache(), Object.keys(e).length > 0) for (let [t, n] of Object.entries(e)) this.helper.loadTranslations(t, n);
|
|
81
|
+
}
|
|
82
|
+
}, _ = null, v = new i();
|
|
83
|
+
function y() {
|
|
84
|
+
let e = v.getStore();
|
|
85
|
+
return e === void 0 ? _ : e;
|
|
88
86
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
function N() {
|
|
92
|
-
const e = I.getStore();
|
|
93
|
-
return e !== void 0 ? e : O;
|
|
87
|
+
function b(e) {
|
|
88
|
+
_ = e;
|
|
94
89
|
}
|
|
95
|
-
function
|
|
96
|
-
|
|
90
|
+
function x(e, t) {
|
|
91
|
+
return v.run(e, t);
|
|
97
92
|
}
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/integration.ts
|
|
95
|
+
function S(e) {
|
|
96
|
+
let { locale: t, fallbackLocale: n, translationDir: r, routingStrategy: i } = e;
|
|
97
|
+
return b(i || null), {
|
|
98
|
+
name: "@i18n-micro/astro",
|
|
99
|
+
hooks: {
|
|
100
|
+
"astro:config:setup": (i) => {
|
|
101
|
+
let { updateConfig: a } = i, o = "virtual:i18n-micro/config", s = `\0${o}`, c = {
|
|
102
|
+
defaultLocale: t,
|
|
103
|
+
fallbackLocale: n || t,
|
|
104
|
+
locales: e.locales || [],
|
|
105
|
+
localeCodes: (e.locales || []).map((e) => e.code),
|
|
106
|
+
translationDir: r || null,
|
|
107
|
+
autoDetect: e.autoDetect ?? !0,
|
|
108
|
+
redirectToDefault: e.redirectToDefault ?? !1,
|
|
109
|
+
localeCookie: e.localeCookie === null ? null : e.localeCookie || "i18n-locale",
|
|
110
|
+
missingWarn: e.missingWarn ?? !1
|
|
111
|
+
};
|
|
112
|
+
a({ vite: { plugins: [{
|
|
113
|
+
name: "vite-plugin-i18n-micro-config",
|
|
114
|
+
resolveId(e) {
|
|
115
|
+
if (e === o) return s;
|
|
116
|
+
},
|
|
117
|
+
load(e) {
|
|
118
|
+
if (e === s) return `export const config = ${JSON.stringify(c)}`;
|
|
119
|
+
}
|
|
120
|
+
}] } });
|
|
121
|
+
},
|
|
122
|
+
"astro:config:done": (e) => {
|
|
123
|
+
let { injectTypes: t } = e;
|
|
124
|
+
t({
|
|
125
|
+
filename: "i18n-micro-env.d.ts",
|
|
126
|
+
content: "\n /// <reference types=\"@i18n-micro/astro/env\" />\n\n declare module 'virtual:i18n-micro/config' {\n export const config: {\n defaultLocale: string;\n fallbackLocale: string;\n locales: import('@i18n-micro/types').Locale[];\n localeCodes: string[];\n translationDir: string | null;\n autoDetect: boolean;\n redirectToDefault: boolean;\n localeCookie: string | null;\n missingWarn: boolean | null;\n }\n }\n "
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
100
131
|
}
|
|
101
|
-
function
|
|
102
|
-
|
|
103
|
-
return X(i || null), {
|
|
104
|
-
name: "@i18n-micro/astro",
|
|
105
|
-
hooks: {
|
|
106
|
-
// 1. Vite setup (virtual module) happens here
|
|
107
|
-
"astro:config:setup": (u) => {
|
|
108
|
-
const { updateConfig: c } = u, o = "virtual:i18n-micro/config", s = `\0${o}`, r = {
|
|
109
|
-
defaultLocale: t,
|
|
110
|
-
fallbackLocale: a || t,
|
|
111
|
-
locales: e.locales || [],
|
|
112
|
-
localeCodes: (e.locales || []).map((n) => n.code),
|
|
113
|
-
translationDir: l || null,
|
|
114
|
-
autoDetect: e.autoDetect ?? !0,
|
|
115
|
-
redirectToDefault: e.redirectToDefault ?? !1,
|
|
116
|
-
localeCookie: e.localeCookie === null ? null : e.localeCookie || "i18n-locale",
|
|
117
|
-
missingWarn: e.missingWarn ?? !1
|
|
118
|
-
};
|
|
119
|
-
c({
|
|
120
|
-
vite: {
|
|
121
|
-
plugins: [
|
|
122
|
-
{
|
|
123
|
-
name: "vite-plugin-i18n-micro-config",
|
|
124
|
-
resolveId(n) {
|
|
125
|
-
if (n === o)
|
|
126
|
-
return s;
|
|
127
|
-
},
|
|
128
|
-
load(n) {
|
|
129
|
-
if (n === s)
|
|
130
|
-
return `export const config = ${JSON.stringify(r)}`;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
]
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
},
|
|
137
|
-
// 2. Type injection happens here (per Astro documentation)
|
|
138
|
-
"astro:config:done": (u) => {
|
|
139
|
-
const { injectTypes: c } = u;
|
|
140
|
-
c({
|
|
141
|
-
filename: "i18n-micro-env.d.ts",
|
|
142
|
-
content: `
|
|
143
|
-
/// <reference types="@i18n-micro/astro/env" />
|
|
144
|
-
|
|
145
|
-
declare module 'virtual:i18n-micro/config' {
|
|
146
|
-
export const config: {
|
|
147
|
-
defaultLocale: string;
|
|
148
|
-
fallbackLocale: string;
|
|
149
|
-
locales: import('@i18n-micro/types').Locale[];
|
|
150
|
-
localeCodes: string[];
|
|
151
|
-
translationDir: string | null;
|
|
152
|
-
autoDetect: boolean;
|
|
153
|
-
redirectToDefault: boolean;
|
|
154
|
-
localeCookie: string | null;
|
|
155
|
-
missingWarn: boolean | null;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
`
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
function ge(e) {
|
|
165
|
-
return new v(e);
|
|
132
|
+
function C(e) {
|
|
133
|
+
return new g(e);
|
|
166
134
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region src/load-translations.ts
|
|
137
|
+
function w(e, t) {
|
|
138
|
+
if (a(e)) for (let n of s(e)) {
|
|
139
|
+
let r = l(e, n);
|
|
140
|
+
if (c(r).isDirectory()) {
|
|
141
|
+
w(r, t);
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
n.endsWith(".json") && t(r);
|
|
145
|
+
}
|
|
177
146
|
}
|
|
178
|
-
function
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
147
|
+
function T(e) {
|
|
148
|
+
let { translationDir: t, rootDir: n = process.cwd(), disablePageLocales: r = !1 } = e, i = d(n, t);
|
|
149
|
+
if (!a(i)) return console.warn(`[i18n] Translation directory not found: ${i}`), {
|
|
150
|
+
root: {},
|
|
151
|
+
routes: {}
|
|
152
|
+
};
|
|
153
|
+
let s = {
|
|
154
|
+
root: {},
|
|
155
|
+
routes: {}
|
|
156
|
+
};
|
|
157
|
+
return w(i, (e) => {
|
|
158
|
+
let t = u(i, e).split(f).join("/");
|
|
159
|
+
try {
|
|
160
|
+
let n = o(e, "utf-8"), i = JSON.parse(n);
|
|
161
|
+
m(s, t, i, r);
|
|
162
|
+
} catch (t) {
|
|
163
|
+
console.error(`[i18n] Failed to load translation file: ${e}`, t);
|
|
164
|
+
}
|
|
165
|
+
}), s;
|
|
192
166
|
}
|
|
193
|
-
function
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
for (const [i, u] of Object.entries(l))
|
|
198
|
-
for (const [c, o] of Object.entries(u))
|
|
199
|
-
e.addRouteTranslations(c, i, Z(a[c], o), !1);
|
|
167
|
+
function E(e, t) {
|
|
168
|
+
let { root: n, routes: r } = T(t);
|
|
169
|
+
for (let [t, r] of Object.entries(n)) e.addTranslations(t, r, !1);
|
|
170
|
+
for (let [t, i] of Object.entries(r)) for (let [r, a] of Object.entries(i)) e.addRouteTranslations(r, t, p(n[r], a), !1);
|
|
200
171
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
fullPath: f.pathname + f.search,
|
|
225
|
-
query: Object.fromEntries(f.searchParams)
|
|
226
|
-
})
|
|
227
|
-
}, m = h.split("/").filter(Boolean)[0], b = m !== void 0 && l.includes(m);
|
|
228
|
-
let S;
|
|
229
|
-
b && m ? S = m : d.getLocaleFromPath ? S = d.getLocaleFromPath(h, a, l) : S = a;
|
|
230
|
-
const y = t.clone(S), R = d.getRouteName ? d.getRouteName(h, l) : "index";
|
|
231
|
-
return y.setRoute(R), r.locals.i18n = y, r.locals.locale = S, r.locals.defaultLocale = a, r.locals.locales = i || l.map((w) => ({ code: w })), r.locals.currentUrl = f, r.locals.routingStrategy = d, Y(d, () => n());
|
|
232
|
-
};
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region src/middleware.ts
|
|
174
|
+
function D(e) {
|
|
175
|
+
let { i18n: t, defaultLocale: n, locales: r, localeObjects: i, autoDetect: a = !0, redirectToDefault: o = !1, routingStrategy: s } = e, c = s || y();
|
|
176
|
+
return async (e, a) => {
|
|
177
|
+
if (e.locals.locale && e.locals.i18n) return a();
|
|
178
|
+
let o = e.url, s = o.pathname;
|
|
179
|
+
if (!c) {
|
|
180
|
+
let c = t.clone(n), l = s === "/" || s === "" ? "index" : s.split("/").filter(Boolean).join("-");
|
|
181
|
+
return c.setRoute(l), e.locals.i18n = c, e.locals.locale = n, e.locals.defaultLocale = n, e.locals.locales = i || r.map((e) => ({ code: e })), e.locals.currentUrl = o, a();
|
|
182
|
+
}
|
|
183
|
+
let l = {
|
|
184
|
+
...c,
|
|
185
|
+
getCurrentPath: () => s,
|
|
186
|
+
getRoute: () => ({
|
|
187
|
+
fullPath: o.pathname + o.search,
|
|
188
|
+
query: Object.fromEntries(o.searchParams)
|
|
189
|
+
})
|
|
190
|
+
}, u = s.split("/").filter(Boolean)[0], d = u !== void 0 && r.includes(u), f;
|
|
191
|
+
f = d && u ? u : l.getLocaleFromPath ? l.getLocaleFromPath(s, n, r) : n;
|
|
192
|
+
let p = t.clone(f), m = l.getRouteName ? l.getRouteName(s, r) : "index";
|
|
193
|
+
return p.setRoute(m), e.locals.i18n = p, e.locals.locale = f, e.locals.defaultLocale = n, e.locals.locales = i || r.map((e) => ({ code: e })), e.locals.currentUrl = o, e.locals.routingStrategy = l, x(l, () => a());
|
|
194
|
+
};
|
|
233
195
|
}
|
|
234
|
-
function
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
r && (s = r);
|
|
251
|
-
} catch {
|
|
252
|
-
}
|
|
253
|
-
return s;
|
|
196
|
+
function O(e, t, n, r, i, a = "i18n-locale", o) {
|
|
197
|
+
let s = o ?? y(), c = r;
|
|
198
|
+
if (s?.getLocaleFromPath) c = s.getLocaleFromPath(e, r, i);
|
|
199
|
+
else {
|
|
200
|
+
let t = e.split("/").filter(Boolean)[0];
|
|
201
|
+
t && i.includes(t) && (c = t);
|
|
202
|
+
}
|
|
203
|
+
if (a !== null && c === r && t.get(a)) {
|
|
204
|
+
let e = t.get(a)?.value;
|
|
205
|
+
e && i.includes(e) && (c = e);
|
|
206
|
+
}
|
|
207
|
+
if (c === r) try {
|
|
208
|
+
let e = h(n.get("accept-language") ?? void 0, i);
|
|
209
|
+
e && (c = e);
|
|
210
|
+
} catch {}
|
|
211
|
+
return c;
|
|
254
212
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region src/router/adapter.ts
|
|
215
|
+
function k(e, t, n) {
|
|
216
|
+
let r = e.map((e) => e.code), i = (e, t = []) => {
|
|
217
|
+
let n = e.replace(/^\//, "").replace(/\/$/, "");
|
|
218
|
+
if (!n) return "index";
|
|
219
|
+
let r = n.split("/").filter(Boolean), i = r[0];
|
|
220
|
+
return i && t.includes(i) && r.shift(), r.length === 0 ? "index" : r.join("-");
|
|
221
|
+
}, a = (e, t = "en", n = []) => {
|
|
222
|
+
let r = e.split("/").filter(Boolean)[0];
|
|
223
|
+
return r && n.includes(r) ? r : t;
|
|
224
|
+
}, o = (e, t, n = [], r) => {
|
|
225
|
+
let i = e.split("/").filter(Boolean), a = i[0];
|
|
226
|
+
return a && n.includes(a) && i.shift(), (t !== r || r === void 0) && i.unshift(t), `/${i.join("/")}`;
|
|
227
|
+
}, s = (e, t, n = [], r) => {
|
|
228
|
+
let i = (e.replace(/^\//, "").replace(/\/$/, "") || "").split("/").filter(Boolean), a = i[0];
|
|
229
|
+
return a && n.includes(a) && i.shift(), (t !== r || r === void 0) && i.unshift(t), `/${i.join("/")}`;
|
|
230
|
+
};
|
|
231
|
+
return {
|
|
232
|
+
getCurrentPath: () => n ? n().pathname : typeof window < "u" ? window.location.pathname : "/",
|
|
233
|
+
getRouteName: i,
|
|
234
|
+
getLocaleFromPath: a,
|
|
235
|
+
switchLocalePath: o,
|
|
236
|
+
localizePath: s,
|
|
237
|
+
removeLocaleFromPath: (e, t = []) => {
|
|
238
|
+
let n = e.split("/").filter(Boolean), r = n[0];
|
|
239
|
+
return r && t.includes(r) && n.shift(), `/${n.join("/")}`;
|
|
240
|
+
},
|
|
241
|
+
resolvePath: (e, n) => {
|
|
242
|
+
let i = typeof e == "string" ? e : e.path || "/";
|
|
243
|
+
return s(i, n, r, t);
|
|
244
|
+
},
|
|
245
|
+
getRoute: () => {
|
|
246
|
+
if (n) {
|
|
247
|
+
let e = n();
|
|
248
|
+
return {
|
|
249
|
+
fullPath: e.pathname + e.search,
|
|
250
|
+
query: Object.fromEntries(e.searchParams)
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
if (typeof window < "u") {
|
|
254
|
+
let e = new URL(window.location.href);
|
|
255
|
+
return {
|
|
256
|
+
fullPath: e.pathname + e.search,
|
|
257
|
+
query: Object.fromEntries(e.searchParams)
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
return {
|
|
261
|
+
fullPath: "/",
|
|
262
|
+
query: {}
|
|
263
|
+
};
|
|
264
|
+
},
|
|
265
|
+
push: (e) => {
|
|
266
|
+
typeof window < "u" && (window.location.href = e.path);
|
|
267
|
+
},
|
|
268
|
+
replace: (e) => {
|
|
269
|
+
typeof window < "u" && window.location.replace(e.path);
|
|
270
|
+
}
|
|
271
|
+
};
|
|
314
272
|
}
|
|
315
|
-
|
|
316
|
-
|
|
273
|
+
//#endregion
|
|
274
|
+
//#region ../utils/dist/resolve-hreflang.mjs
|
|
275
|
+
function A(e) {
|
|
276
|
+
return e.iso?.trim() || String(e.code);
|
|
317
277
|
}
|
|
318
|
-
function
|
|
319
|
-
|
|
320
|
-
|
|
278
|
+
function j(e) {
|
|
279
|
+
let t = e.match(/^([A-Za-z]{2,3})(?:[-_](.+))?$/);
|
|
280
|
+
return t ? {
|
|
281
|
+
language: t[1],
|
|
282
|
+
region: t[2]
|
|
283
|
+
} : { language: e };
|
|
321
284
|
}
|
|
322
|
-
function
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
285
|
+
function M(e, t = {}) {
|
|
286
|
+
let { hreflangBaseLanguage: n = !1 } = t;
|
|
287
|
+
if (!n) return e.map((e) => {
|
|
288
|
+
let t = String(e.code);
|
|
289
|
+
return {
|
|
290
|
+
hreflang: A(e),
|
|
291
|
+
localeCode: t
|
|
292
|
+
};
|
|
293
|
+
});
|
|
294
|
+
let r = /* @__PURE__ */ new Map();
|
|
295
|
+
for (let t of e) {
|
|
296
|
+
let e = String(t.code), n = A(t), { language: i, region: a } = j(n);
|
|
297
|
+
i && a && !r.has(i) && r.set(i, e), r.set(n, e);
|
|
298
|
+
}
|
|
299
|
+
let i = /* @__PURE__ */ new Set(), a = [];
|
|
300
|
+
for (let t of e) {
|
|
301
|
+
let e = String(t.code), n = A(t), { language: o, region: s } = j(n);
|
|
302
|
+
o && s && r.get(o) === e && !i.has(o) && (i.add(o), a.push({
|
|
303
|
+
hreflang: o,
|
|
304
|
+
localeCode: e
|
|
305
|
+
})), i.has(n) || (i.add(n), a.push({
|
|
306
|
+
hreflang: n,
|
|
307
|
+
localeCode: e
|
|
308
|
+
}));
|
|
309
|
+
}
|
|
310
|
+
return a;
|
|
340
311
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region ../utils/dist/resolve-og-locale.mjs
|
|
314
|
+
function N(e) {
|
|
315
|
+
let t = e.og?.trim();
|
|
316
|
+
if (t) return t;
|
|
317
|
+
let n = e.iso?.trim();
|
|
318
|
+
if (!n) return null;
|
|
319
|
+
let r = n.indexOf("_");
|
|
320
|
+
if (r > 0) {
|
|
321
|
+
let e = n.slice(0, r), t = n.slice(r + 1);
|
|
322
|
+
if (e.length >= 2 && t.length === 2) return `${e.toLowerCase()}_${t.toUpperCase()}`;
|
|
323
|
+
}
|
|
324
|
+
let i = n.indexOf("-");
|
|
325
|
+
if (i > 0) {
|
|
326
|
+
let e = n.slice(0, i), t = n.slice(i + 1);
|
|
327
|
+
if (e.length >= 2 && t.length === 2 && /^[A-Za-z]{2}$/.test(t)) return `${e.toLowerCase()}_${t.toUpperCase()}`;
|
|
328
|
+
}
|
|
329
|
+
return null;
|
|
359
330
|
}
|
|
360
|
-
function
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
`[i18n] Cannot derive ${a} for locale '${l}'${i}. Set locale.og (e.g. 'en_US') or use iso with a 2-letter region (e.g. 'en-US').`
|
|
365
|
-
);
|
|
331
|
+
function P(e, t = {}) {
|
|
332
|
+
if (N(e) !== null || t.missingWarn === !1 || process.env.NODE_ENV === "production") return;
|
|
333
|
+
let n = t.tag ?? "og:locale", r = String(e.code ?? "unknown"), i = e.iso ? `, iso: '${e.iso}'` : "";
|
|
334
|
+
console.warn(`[i18n] Cannot derive ${n} for locale '${r}'${i}. Set locale.og (e.g. 'en_US') or use iso with a 2-letter region (e.g. 'en-US').`);
|
|
366
335
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
336
|
+
//#endregion
|
|
337
|
+
//#region src/utils.ts
|
|
338
|
+
function F(e) {
|
|
339
|
+
let t = e.locals.i18n;
|
|
340
|
+
if (!t) throw Error("i18n instance not found. Make sure i18n middleware is configured.");
|
|
341
|
+
return t;
|
|
372
342
|
}
|
|
373
|
-
function
|
|
374
|
-
|
|
343
|
+
function I(e) {
|
|
344
|
+
return e.locals.locale || "en";
|
|
375
345
|
}
|
|
376
|
-
function
|
|
377
|
-
|
|
346
|
+
function L(e) {
|
|
347
|
+
return e.locals.defaultLocale || "en";
|
|
378
348
|
}
|
|
379
|
-
function
|
|
380
|
-
|
|
349
|
+
function R(e) {
|
|
350
|
+
return e.locals.locales || [];
|
|
381
351
|
}
|
|
382
|
-
function
|
|
383
|
-
|
|
352
|
+
function z(e) {
|
|
353
|
+
return e.locals.routingStrategy || null;
|
|
384
354
|
}
|
|
385
|
-
function
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
},
|
|
442
|
-
addRouteTranslations: (o, s, r, n = !0) => {
|
|
443
|
-
t.addRouteTranslations(o, s, r, n);
|
|
444
|
-
},
|
|
445
|
-
mergeTranslations: (o, s, r) => {
|
|
446
|
-
t.mergeTranslations(o, s, r);
|
|
447
|
-
},
|
|
448
|
-
clearCache: () => {
|
|
449
|
-
t.clearCache();
|
|
450
|
-
}
|
|
451
|
-
};
|
|
355
|
+
function B(e) {
|
|
356
|
+
let t = F(e), n = I(e), r = L(e), i = R(e), a = i.map((e) => e.code), o = z(e);
|
|
357
|
+
return {
|
|
358
|
+
locale: n,
|
|
359
|
+
defaultLocale: r,
|
|
360
|
+
locales: i,
|
|
361
|
+
t: (e, n, r, i) => t.t(e, n, r, i),
|
|
362
|
+
ts: (e, n, r, i) => t.ts(e, n, r, i),
|
|
363
|
+
tc: (e, n, r) => t.tc(e, n, r),
|
|
364
|
+
tn: t.tn.bind(t),
|
|
365
|
+
td: t.td.bind(t),
|
|
366
|
+
tdr: t.tdr.bind(t),
|
|
367
|
+
has: (e, n) => t.has(e, n),
|
|
368
|
+
getRoute: () => t.getRoute(),
|
|
369
|
+
getRouteName: (t) => {
|
|
370
|
+
let n = t || e.url.pathname;
|
|
371
|
+
if (o?.getRouteName) return o.getRouteName(n, a);
|
|
372
|
+
let r = n.replace(/^\//, "").replace(/\/$/, "");
|
|
373
|
+
if (!r) return "index";
|
|
374
|
+
let i = r.split("/").filter(Boolean), s = i[0];
|
|
375
|
+
return s && a.includes(s) && i.shift(), i.length === 0 ? "index" : i.join("-");
|
|
376
|
+
},
|
|
377
|
+
getLocaleFromPath: (t) => {
|
|
378
|
+
let n = t || e.url.pathname;
|
|
379
|
+
if (o?.getLocaleFromPath) return o.getLocaleFromPath(n, r, a);
|
|
380
|
+
let i = n.split("/").filter(Boolean)[0];
|
|
381
|
+
return i && a.includes(i) ? i : r;
|
|
382
|
+
},
|
|
383
|
+
switchLocalePath: (t) => {
|
|
384
|
+
if (o?.switchLocalePath) return o.switchLocalePath(e.url.pathname, t, a, r);
|
|
385
|
+
let n = e.url.pathname.split("/").filter(Boolean), i = n[0];
|
|
386
|
+
return i && a.includes(i) && n.shift(), t !== r && n.unshift(t), `/${n.join("/")}`;
|
|
387
|
+
},
|
|
388
|
+
localizePath: (e, t) => {
|
|
389
|
+
if (o?.localizePath) return o.localizePath(e, t || n, a, r);
|
|
390
|
+
let i = (e.replace(/^\//, "").replace(/\/$/, "") || "").split("/").filter(Boolean), s = i[0];
|
|
391
|
+
return s && a.includes(s) && i.shift(), t && t !== r && i.unshift(t), `/${i.join("/")}`;
|
|
392
|
+
},
|
|
393
|
+
getI18n: () => t,
|
|
394
|
+
getBasePath: (t) => {
|
|
395
|
+
let n = (t || e.url).pathname.split("/").filter(Boolean), r = n[0];
|
|
396
|
+
return r && a.includes(r) && n.shift(), n.length > 0 ? `/${n.join("/")}` : "/";
|
|
397
|
+
},
|
|
398
|
+
addTranslations: (e, n, r = !0) => {
|
|
399
|
+
t.addTranslations(e, n, r);
|
|
400
|
+
},
|
|
401
|
+
addRouteTranslations: (e, n, r, i = !0) => {
|
|
402
|
+
t.addRouteTranslations(e, n, r, i);
|
|
403
|
+
},
|
|
404
|
+
mergeTranslations: (e, n, r) => {
|
|
405
|
+
t.mergeTranslations(e, n, r);
|
|
406
|
+
},
|
|
407
|
+
clearCache: () => {
|
|
408
|
+
t.clearCache();
|
|
409
|
+
}
|
|
410
|
+
};
|
|
452
411
|
}
|
|
453
|
-
function
|
|
454
|
-
|
|
455
|
-
|
|
412
|
+
function V(e) {
|
|
413
|
+
let t = e.locals.currentUrl ?? e.url;
|
|
414
|
+
return B(e).getBasePath(t);
|
|
456
415
|
}
|
|
457
|
-
function
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
return l && (l.locale = t, e.locals.locale = t), oe(e);
|
|
416
|
+
function H(e) {
|
|
417
|
+
let { locale: t } = e.params, n = R(e).map((e) => e.code);
|
|
418
|
+
if (!t || !n.includes(t)) return new Response(null, { status: 404 });
|
|
419
|
+
let r = e.locals.i18n;
|
|
420
|
+
return r && (r.locale = t, e.locals.locale = t), V(e);
|
|
463
421
|
}
|
|
464
|
-
function
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
422
|
+
function U(e, t = {}) {
|
|
423
|
+
let { baseUrl: n = "/", addDirAttribute: r = !0, addSeoAttributes: i = !0, hreflangBaseLanguage: a = !1 } = t, o = I(e), s = L(e), c = R(e).filter((e) => !e.disabled), l = c.filter((e) => e.seo !== !1), u = c.find((e) => e.code === o);
|
|
424
|
+
if (!u) return {
|
|
425
|
+
htmlAttrs: {},
|
|
426
|
+
link: [],
|
|
427
|
+
meta: []
|
|
428
|
+
};
|
|
429
|
+
let d = u.iso || o, f = N(u), p = u.dir || "auto", m = {
|
|
430
|
+
htmlAttrs: {
|
|
431
|
+
lang: d,
|
|
432
|
+
...r ? { dir: p } : {}
|
|
433
|
+
},
|
|
434
|
+
link: [],
|
|
435
|
+
meta: []
|
|
436
|
+
};
|
|
437
|
+
if (!i) return m;
|
|
438
|
+
let h = `${n}${e.url.pathname}`;
|
|
439
|
+
m.link.push({
|
|
440
|
+
rel: "canonical",
|
|
441
|
+
href: h
|
|
442
|
+
});
|
|
443
|
+
let g = z(e), _ = c.map((e) => e.code), v = /* @__PURE__ */ new Map();
|
|
444
|
+
for (let t of l) {
|
|
445
|
+
let r = e.url.pathname;
|
|
446
|
+
if (g?.switchLocalePath) r = g.switchLocalePath(e.url.pathname, t.code, _, s);
|
|
447
|
+
else {
|
|
448
|
+
let n = e.url.pathname.split("/").filter(Boolean), i = n[0];
|
|
449
|
+
i && _.includes(i) && n.shift(), t.code !== s && n.unshift(t.code), r = `/${n.join("/")}`;
|
|
450
|
+
}
|
|
451
|
+
v.set(String(t.code), `${n}${r}`);
|
|
452
|
+
}
|
|
453
|
+
for (let { hreflang: e, localeCode: t } of M(l, { hreflangBaseLanguage: a })) {
|
|
454
|
+
let n = v.get(t);
|
|
455
|
+
n && m.link.push({
|
|
456
|
+
rel: "alternate",
|
|
457
|
+
href: n,
|
|
458
|
+
hreflang: e
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
if (c.find((e) => e.code === s)?.seo !== !1) {
|
|
462
|
+
let t = e.url.pathname;
|
|
463
|
+
if (g?.switchLocalePath) t = g.switchLocalePath(e.url.pathname, s, _, s);
|
|
464
|
+
else {
|
|
465
|
+
let n = e.url.pathname.split("/").filter(Boolean), r = n[0];
|
|
466
|
+
r && _.includes(r) && n.shift(), t = `/${n.join("/")}`;
|
|
467
|
+
}
|
|
468
|
+
m.link.push({
|
|
469
|
+
rel: "alternate",
|
|
470
|
+
href: `${n}${t}`,
|
|
471
|
+
hreflang: "x-default"
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
f ? m.meta.push({
|
|
475
|
+
property: "og:locale",
|
|
476
|
+
content: f
|
|
477
|
+
}) : P(u, { tag: "og:locale" }), m.meta.push({
|
|
478
|
+
property: "og:url",
|
|
479
|
+
content: h
|
|
480
|
+
});
|
|
481
|
+
for (let e of l) {
|
|
482
|
+
if (e.code === o) continue;
|
|
483
|
+
let t = N(e);
|
|
484
|
+
if (!t) {
|
|
485
|
+
P(e, { tag: "og:locale:alternate" });
|
|
486
|
+
continue;
|
|
487
|
+
}
|
|
488
|
+
m.meta.push({
|
|
489
|
+
property: "og:locale:alternate",
|
|
490
|
+
content: t
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
return m;
|
|
536
494
|
}
|
|
537
|
-
function
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
u !== void 0 && (i[u] = a);
|
|
495
|
+
function W(e, t, n) {
|
|
496
|
+
let r = t.split("."), i = e;
|
|
497
|
+
for (let e = 0; e < r.length - 1; e++) {
|
|
498
|
+
let t = r[e];
|
|
499
|
+
i[t] || (i[t] = {}), i = i[t];
|
|
500
|
+
}
|
|
501
|
+
let a = r[r.length - 1];
|
|
502
|
+
a !== void 0 && (i[a] = n);
|
|
546
503
|
}
|
|
547
|
-
function
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
504
|
+
function G(e, t) {
|
|
505
|
+
let n = F(e), r = I(e), i = L(e), a = n.getRoute(), o = {};
|
|
506
|
+
if (t && t.length > 0) {
|
|
507
|
+
let e = {};
|
|
508
|
+
for (let r of t) {
|
|
509
|
+
let t = n.t(r, void 0, void 0, a);
|
|
510
|
+
t != null && t !== r && W(e, r, t);
|
|
511
|
+
}
|
|
512
|
+
Object.keys(e).length > 0 && (o[a] = e);
|
|
513
|
+
} else {
|
|
514
|
+
let e = n.getRouteTranslations(r, a);
|
|
515
|
+
e && (o[a] = e);
|
|
516
|
+
}
|
|
517
|
+
return {
|
|
518
|
+
locale: r,
|
|
519
|
+
fallbackLocale: i,
|
|
520
|
+
currentRoute: a,
|
|
521
|
+
translations: o
|
|
522
|
+
};
|
|
566
523
|
}
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
we as FormatService,
|
|
570
|
-
pe as createAstroRouterAdapter,
|
|
571
|
-
ge as createI18n,
|
|
572
|
-
de as createI18nMiddleware,
|
|
573
|
-
Re as defaultPlural,
|
|
574
|
-
me as detectLocale,
|
|
575
|
-
k as getDefaultLocale,
|
|
576
|
-
N as getGlobalRoutingStrategy,
|
|
577
|
-
A as getI18n,
|
|
578
|
-
Pe as getI18nProps,
|
|
579
|
-
j as getLocale,
|
|
580
|
-
oe as getLocaleRewritePath,
|
|
581
|
-
F as getLocales,
|
|
582
|
-
fe as i18nIntegration,
|
|
583
|
-
Te as interpolate,
|
|
584
|
-
ee as loadTranslationsFromDir,
|
|
585
|
-
he as loadTranslationsIntoI18n,
|
|
586
|
-
Le as prepareLocaleRewrite,
|
|
587
|
-
Y as runWithRoutingStrategy,
|
|
588
|
-
X as setGlobalRoutingStrategy,
|
|
589
|
-
ne as useI18n,
|
|
590
|
-
Se as useLocaleHead
|
|
591
|
-
};
|
|
524
|
+
//#endregion
|
|
525
|
+
export { g as AstroI18n, t as FormatService, k as createAstroRouterAdapter, C as createI18n, D as createI18nMiddleware, n as defaultPlural, O as detectLocale, L as getDefaultLocale, y as getGlobalRoutingStrategy, F as getI18n, G as getI18nProps, I as getLocale, V as getLocaleRewritePath, R as getLocales, S as i18nIntegration, r as interpolate, T as loadTranslationsFromDir, E as loadTranslationsIntoI18n, H as prepareLocaleRewrite, x as runWithRoutingStrategy, b as setGlobalRoutingStrategy, B as useI18n, U as useLocaleHead };
|