nuxt-i18n-micro 1.10.1 → 1.11.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/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/721360c4-039e-4946-a38d-6794f6cf340b.json +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +86 -27
- package/dist/runtime/components/i18n-link.vue +1 -1
- package/dist/runtime/components/i18n-switcher.vue +5 -2
- package/dist/runtime/composables/useI18n.js +2 -0
- package/dist/runtime/plugins/01.plugin.d.ts +6 -0
- package/dist/runtime/plugins/01.plugin.js +20 -1
- package/dist/runtime/plugins/03.define.js +7 -3
- package/dist/runtime/server/middleware/i18n-redirect.js +5 -0
- package/package.json +1 -1
- package/dist/client/_nuxt/builds/meta/12fb941a-fcb7-4438-a5ba-415cd42d46f9.json +0 -1
package/dist/client/200.html
CHANGED
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
<link rel="prefetch" as="style" href="/__nuxt-i18n-micro/_nuxt/error-500.21ZDxC33.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/DzdJBprQ.js">
|
|
11
11
|
<script type="module" src="/__nuxt-i18n-micro/_nuxt/D1fvHJQV.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"serverRendered":1},false]</script>
|
|
12
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"721360c4-039e-4946-a38d-6794f6cf340b",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
<link rel="prefetch" as="style" href="/__nuxt-i18n-micro/_nuxt/error-500.21ZDxC33.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/DzdJBprQ.js">
|
|
11
11
|
<script type="module" src="/__nuxt-i18n-micro/_nuxt/D1fvHJQV.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"serverRendered":1},false]</script>
|
|
12
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"721360c4-039e-4946-a38d-6794f6cf340b",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"721360c4-039e-4946-a38d-6794f6cf340b","timestamp":1725113752053}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"721360c4-039e-4946-a38d-6794f6cf340b","timestamp":1725113752053,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
package/dist/client/index.html
CHANGED
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
<link rel="prefetch" as="style" href="/__nuxt-i18n-micro/_nuxt/error-500.21ZDxC33.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/DzdJBprQ.js">
|
|
11
11
|
<script type="module" src="/__nuxt-i18n-micro/_nuxt/D1fvHJQV.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"serverRendered":1},false]</script>
|
|
12
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"721360c4-039e-4946-a38d-6794f6cf340b",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -186,16 +186,24 @@ const module = defineNuxtModule({
|
|
|
186
186
|
const pagesDir = path.resolve(nuxt.options.rootDir, options.translationDir, "pages");
|
|
187
187
|
extendPages((pages) => {
|
|
188
188
|
const customPaths = {};
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
189
|
+
function extractCustomPaths(pages2, parentPath = "") {
|
|
190
|
+
for (const page of pages2) {
|
|
191
|
+
if (page.file) {
|
|
192
|
+
const filePath = path.resolve(nuxt.options.rootDir, page.file);
|
|
193
|
+
const fileContent = readFileSync(filePath, "utf-8");
|
|
194
|
+
const i18nRouteConfig = extractDefineI18nRouteConfig(fileContent, filePath);
|
|
195
|
+
if (i18nRouteConfig && i18nRouteConfig.localeRoutes) {
|
|
196
|
+
const fullPath = parentPath ? `${parentPath}/${page.path}` : page.path;
|
|
197
|
+
customPaths[fullPath] = i18nRouteConfig.localeRoutes;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (page.children && page.children.length > 0) {
|
|
201
|
+
const fullParentName = parentPath ? `${parentPath}/${page.path}` : page.path;
|
|
202
|
+
extractCustomPaths(page.children, fullParentName);
|
|
196
203
|
}
|
|
197
204
|
}
|
|
198
205
|
}
|
|
206
|
+
extractCustomPaths(pages);
|
|
199
207
|
const pagesNames = pages.map((page) => page.name).filter((name) => name && (!options.routesLocaleLinks || !options.routesLocaleLinks[name]));
|
|
200
208
|
function ensureFileExists(filePath) {
|
|
201
209
|
const fileDir = path.dirname(filePath);
|
|
@@ -218,6 +226,38 @@ const module = defineNuxtModule({
|
|
|
218
226
|
});
|
|
219
227
|
const newRoutes = [];
|
|
220
228
|
for (let i = 0; i < pages.length; i++) {
|
|
229
|
+
let localizeChildren = function(routes, parentPath = "") {
|
|
230
|
+
if (!parentPath.startsWith("/")) {
|
|
231
|
+
parentPath = "/" + parentPath;
|
|
232
|
+
}
|
|
233
|
+
return routes.map((route) => {
|
|
234
|
+
const fullPath = parentPath ? `${parentPath}/${route.path}` : route.path;
|
|
235
|
+
const customLocalePaths = customPaths[fullPath];
|
|
236
|
+
const localizedChildren = route.children ? localizeChildren(route.children, fullPath) : [];
|
|
237
|
+
const localizedRoutes = locales.map((locale) => {
|
|
238
|
+
let path2 = customLocalePaths && customLocalePaths[locale.code] ? `${customLocalePaths[locale.code]}` : `${fullPath}`;
|
|
239
|
+
if (path2.startsWith("/")) {
|
|
240
|
+
path2 = path2.slice(1);
|
|
241
|
+
}
|
|
242
|
+
return {
|
|
243
|
+
...route,
|
|
244
|
+
name: `localized-${route.name}-${locale.code}`,
|
|
245
|
+
path: path2,
|
|
246
|
+
children: localizedChildren
|
|
247
|
+
// Use localized children
|
|
248
|
+
};
|
|
249
|
+
});
|
|
250
|
+
if (customLocalePaths) {
|
|
251
|
+
return localizedRoutes;
|
|
252
|
+
}
|
|
253
|
+
return {
|
|
254
|
+
...route,
|
|
255
|
+
name: `localized-${route.name}`,
|
|
256
|
+
children: localizedChildren
|
|
257
|
+
// Use localized children
|
|
258
|
+
};
|
|
259
|
+
}).flat();
|
|
260
|
+
};
|
|
221
261
|
const page = pages[i];
|
|
222
262
|
if (page.redirect && !page.file) {
|
|
223
263
|
continue;
|
|
@@ -230,17 +270,6 @@ const module = defineNuxtModule({
|
|
|
230
270
|
});
|
|
231
271
|
}
|
|
232
272
|
});
|
|
233
|
-
const newRoute = {
|
|
234
|
-
file: page.file,
|
|
235
|
-
meta: { ...page.meta },
|
|
236
|
-
alias: page.alias,
|
|
237
|
-
redirect: page.redirect,
|
|
238
|
-
children: page.children,
|
|
239
|
-
mode: page.mode,
|
|
240
|
-
path: `/:locale(${modLocaleRegex.join("|")})${page.path}`,
|
|
241
|
-
name: `localized-${page.name}`
|
|
242
|
-
};
|
|
243
|
-
newRoutes.push(newRoute);
|
|
244
273
|
if (customPaths[page.path]) {
|
|
245
274
|
locales.forEach((locale) => {
|
|
246
275
|
if (customPaths[page.path][locale.code]) {
|
|
@@ -258,6 +287,20 @@ const module = defineNuxtModule({
|
|
|
258
287
|
}
|
|
259
288
|
});
|
|
260
289
|
}
|
|
290
|
+
if (!modLocaleRegex.length && !page.children?.length) {
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
293
|
+
const newRoute = {
|
|
294
|
+
file: page.file,
|
|
295
|
+
meta: { ...page.meta },
|
|
296
|
+
alias: page.alias,
|
|
297
|
+
redirect: page.redirect,
|
|
298
|
+
children: page.children ? localizeChildren(page.children, page.name) : [],
|
|
299
|
+
mode: page.mode,
|
|
300
|
+
path: `/:locale(${modLocaleRegex.join("|")})${page.path}`,
|
|
301
|
+
name: `localized-${page.name}`
|
|
302
|
+
};
|
|
303
|
+
newRoutes.push(newRoute);
|
|
261
304
|
}
|
|
262
305
|
pages.push(...newRoutes);
|
|
263
306
|
nuxt.options.generate.routes = Array.isArray(nuxt.options.generate.routes) ? nuxt.options.generate.routes : [];
|
|
@@ -321,18 +364,32 @@ const module = defineNuxtModule({
|
|
|
321
364
|
}
|
|
322
365
|
}
|
|
323
366
|
});
|
|
324
|
-
function
|
|
367
|
+
function cleanObjectString(objectString) {
|
|
368
|
+
let cleanedString = objectString.replace(/'/g, '"');
|
|
369
|
+
cleanedString = cleanedString.replace(/([{,]\s*)(\w+)(\s*:)/g, '$1"$2"$3');
|
|
370
|
+
cleanedString = cleanedString.replace(/,(\s*[}\]])/g, "$1");
|
|
371
|
+
cleanedString = cleanedString.replace(/,+/g, ",");
|
|
372
|
+
cleanedString = cleanedString.replace(/(\{|\[)\s*,/g, "$1");
|
|
373
|
+
cleanedString = cleanedString.replace(/,(\s*[}\]])/g, "$1");
|
|
374
|
+
cleanedString = cleanedString.trim();
|
|
375
|
+
if (!cleanedString.startsWith("{") || !cleanedString.endsWith("}")) {
|
|
376
|
+
throw new Error("Invalid object format after cleaning");
|
|
377
|
+
}
|
|
378
|
+
return cleanedString;
|
|
379
|
+
}
|
|
380
|
+
function extractDefineI18nRouteConfig(content, path2) {
|
|
325
381
|
const match = content.match(/\$defineI18nRoute\((\{[\s\S]*?\})\)/);
|
|
326
382
|
if (match && match[1]) {
|
|
327
383
|
try {
|
|
328
|
-
const
|
|
384
|
+
const cleanedString = cleanObjectString(match[1]);
|
|
385
|
+
const configObject = JSON.parse(cleanedString);
|
|
329
386
|
if (validateDefineI18nRouteConfig(configObject)) {
|
|
330
387
|
return configObject;
|
|
331
388
|
} else {
|
|
332
|
-
console.error("Invalid defineI18nRoute configuration format:", configObject);
|
|
389
|
+
console.error("Invalid defineI18nRoute configuration format:", configObject, "in file: ", path2);
|
|
333
390
|
}
|
|
334
391
|
} catch (error) {
|
|
335
|
-
console.error("Failed to parse defineI18nRoute configuration:", error);
|
|
392
|
+
console.error("Failed to parse defineI18nRoute configuration:", error, "in file: ", path2);
|
|
336
393
|
}
|
|
337
394
|
}
|
|
338
395
|
return null;
|
|
@@ -340,12 +397,14 @@ function extractDefineI18nRouteConfig(content) {
|
|
|
340
397
|
function validateDefineI18nRouteConfig(obj) {
|
|
341
398
|
if (typeof obj !== "object" || obj === null)
|
|
342
399
|
return false;
|
|
343
|
-
if (
|
|
344
|
-
|
|
345
|
-
for (const localeKey in obj.locales) {
|
|
346
|
-
const translations = obj.locales[localeKey];
|
|
347
|
-
if (typeof translations !== "object" || translations === null)
|
|
400
|
+
if (obj.locales) {
|
|
401
|
+
if (typeof obj.locales !== "object")
|
|
348
402
|
return false;
|
|
403
|
+
for (const localeKey in obj.locales) {
|
|
404
|
+
const translations = obj.locales[localeKey];
|
|
405
|
+
if (typeof translations !== "object" || translations === null)
|
|
406
|
+
return false;
|
|
407
|
+
}
|
|
349
408
|
}
|
|
350
409
|
if (obj.localeRoutes) {
|
|
351
410
|
if (typeof obj.localeRoutes !== "object")
|
|
@@ -66,7 +66,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
66
66
|
|
|
67
67
|
const { $localeRoute, $getLocales, $getLocale } = useNuxtApp()
|
|
68
68
|
const locales = ref($getLocales())
|
|
69
|
-
const currentLocale =
|
|
69
|
+
const currentLocale = computed(() => $getLocale())
|
|
70
70
|
const dropdownOpen = ref(false)
|
|
71
71
|
|
|
72
72
|
const toggleDropdown = () => {
|
|
@@ -81,7 +81,10 @@ const currentLocaleLabel = computed(() => localeLabel({ code: currentLocale.valu
|
|
|
81
81
|
|
|
82
82
|
const getLocaleLink = (locale: Locale) => {
|
|
83
83
|
const route = useRoute()
|
|
84
|
-
const routeName = (route?.name ?? '').toString()
|
|
84
|
+
const routeName = (route?.name ?? '').toString()
|
|
85
|
+
.replace(`localized-`, '')
|
|
86
|
+
.replace(new RegExp(`-${currentLocale.value}$`), '')
|
|
87
|
+
.replace(new RegExp(`-${locale}$`), '')
|
|
85
88
|
|
|
86
89
|
return $localeRoute({ name: routeName }, locale.code)
|
|
87
90
|
}
|
|
@@ -12,6 +12,8 @@ declare const _default: import("#app").Plugin<{
|
|
|
12
12
|
getLocales: () => Locale[];
|
|
13
13
|
t: (key: string, params?: Record<string, string | number | boolean>, defaultValue?: string) => unknown;
|
|
14
14
|
tc: (key: string, count: number, defaultValue?: string) => string;
|
|
15
|
+
tn: (value: number, options?: Intl.NumberFormatOptions) => string;
|
|
16
|
+
td: (value: Date | number | string, options?: Intl.DateTimeFormatOptions) => string;
|
|
15
17
|
has: (key: string) => boolean;
|
|
16
18
|
mergeTranslations: (newTranslations: Translations) => void;
|
|
17
19
|
switchLocale: (locale: string) => void;
|
|
@@ -21,6 +23,8 @@ declare const _default: import("#app").Plugin<{
|
|
|
21
23
|
getLocales: () => Locale[];
|
|
22
24
|
t: (key: string, params?: Record<string, string | number | boolean>, defaultValue?: string) => unknown;
|
|
23
25
|
tc: (key: string, count: number, defaultValue?: string) => string;
|
|
26
|
+
tn: (value: number, options?: Intl.NumberFormatOptions) => string;
|
|
27
|
+
td: (value: Date | number | string, options?: Intl.DateTimeFormatOptions) => string;
|
|
24
28
|
has: (key: string) => boolean;
|
|
25
29
|
mergeTranslations: (newTranslations: Translations) => void;
|
|
26
30
|
switchLocale: (locale: string) => void;
|
|
@@ -32,6 +36,8 @@ export interface PluginsInjections {
|
|
|
32
36
|
$getLocales: () => Locale[];
|
|
33
37
|
$t: <T extends Record<string, string | number | boolean>>(key: string, params?: T, defaultValue?: string) => string | number | boolean | Translations | PluralTranslations | unknown[] | unknown | null;
|
|
34
38
|
$tc: (key: string, count: number, defaultValue?: string) => string;
|
|
39
|
+
$tn: (value: number, options?: Intl.NumberFormatOptions) => string;
|
|
40
|
+
$td: (value: Date | number | string, options?: Intl.DateTimeFormatOptions) => string;
|
|
35
41
|
$has: (key: string) => boolean;
|
|
36
42
|
$mergeTranslations: (newTranslations: Translations) => void;
|
|
37
43
|
$switchLocale: (locale: string) => void;
|
|
@@ -55,6 +55,12 @@ function getLocalizedRoute(to, router, route, i18nConfig, locale) {
|
|
|
55
55
|
}
|
|
56
56
|
return router.resolve({ name: newRouteName, params: newParams });
|
|
57
57
|
}
|
|
58
|
+
function formatNumber(value, locale, options) {
|
|
59
|
+
return new Intl.NumberFormat(locale, options).format(value);
|
|
60
|
+
}
|
|
61
|
+
function formatDate(value, locale, options) {
|
|
62
|
+
return new Intl.DateTimeFormat(locale, options).format(new Date(value));
|
|
63
|
+
}
|
|
58
64
|
export default defineNuxtPlugin(async (nuxtApp) => {
|
|
59
65
|
const registerI18nModule = (translations, locale) => {
|
|
60
66
|
i18nHelper.mergeGlobalTranslation(locale, translations);
|
|
@@ -68,7 +74,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|
|
68
74
|
const i18nConfig = config.public.i18nConfig;
|
|
69
75
|
const plural = new Function("return " + i18nConfig.plural)();
|
|
70
76
|
const initialLocale = getCurrentLocale(route, i18nConfig);
|
|
71
|
-
if (!i18nHelper.hasGeneralTranslation(initialLocale)) {
|
|
77
|
+
if (import.meta.server && !i18nHelper.hasGeneralTranslation(initialLocale)) {
|
|
72
78
|
const data = await $fetch(`/_locales/general/${initialLocale}/data.json?v=${i18nConfig.dateBuild}`, { baseURL: i18nConfig.baseURL });
|
|
73
79
|
await i18nHelper.loadTranslations(initialLocale, data ?? {});
|
|
74
80
|
}
|
|
@@ -88,6 +94,11 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|
|
88
94
|
await loadTranslationsIfNeeded(locale, initialRouteName);
|
|
89
95
|
}
|
|
90
96
|
useRouter().beforeEach(async (to, from, next) => {
|
|
97
|
+
if (import.meta.client) {
|
|
98
|
+
const locale = getCurrentLocale(to, i18nConfig);
|
|
99
|
+
const data = await $fetch(`/_locales/general/${locale}/data.json?v=${i18nConfig.dateBuild}`, { baseURL: i18nConfig.baseURL });
|
|
100
|
+
await i18nHelper.loadTranslations(locale, data ?? {});
|
|
101
|
+
}
|
|
91
102
|
if (import.meta.client && !i18nConfig.disablePageLocales) {
|
|
92
103
|
const locale = getCurrentLocale(to, i18nConfig);
|
|
93
104
|
const routeName = getRouteName(to, locale);
|
|
@@ -117,6 +128,14 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|
|
117
128
|
const translation = getTranslation(key, {}, defaultValue);
|
|
118
129
|
return plural(translation?.toString(), count, getCurrentLocale(useRoute(), i18nConfig));
|
|
119
130
|
},
|
|
131
|
+
tn: (value, options) => {
|
|
132
|
+
const locale = getCurrentLocale(useRoute(), i18nConfig);
|
|
133
|
+
return formatNumber(value, locale, options);
|
|
134
|
+
},
|
|
135
|
+
td: (value, options) => {
|
|
136
|
+
const locale = getCurrentLocale(useRoute(), i18nConfig);
|
|
137
|
+
return formatDate(value, locale, options);
|
|
138
|
+
},
|
|
120
139
|
has: (key) => {
|
|
121
140
|
return !!getTranslation(key);
|
|
122
141
|
},
|
|
@@ -20,17 +20,21 @@ export default defineNuxtPlugin((_nuxtApp) => {
|
|
|
20
20
|
const currentLocale = (route.params.locale || i18nConfig.defaultLocale).toString();
|
|
21
21
|
const normalizedLocales = normalizeLocales(routeDefinition.locales);
|
|
22
22
|
const { name } = route;
|
|
23
|
-
if (normalizedLocales[currentLocale]) {
|
|
23
|
+
if (!Object.values(normalizedLocales).length || normalizedLocales[currentLocale]) {
|
|
24
24
|
const translation = normalizedLocales[currentLocale];
|
|
25
25
|
const nuxtApp = useNuxtApp();
|
|
26
26
|
nuxtApp.$mergeTranslations(translation);
|
|
27
27
|
} else {
|
|
28
|
-
let defaultRouteName = name?.toString().replace("localized-", "");
|
|
28
|
+
let defaultRouteName = name?.toString().replace("localized-", "").replace(new RegExp(`-${currentLocale}$`), "");
|
|
29
29
|
const resolvedRoute = router.resolve({ name: defaultRouteName });
|
|
30
30
|
const newParams = { ...route.params };
|
|
31
31
|
delete newParams.locale;
|
|
32
32
|
if (i18nConfig.includeDefaultLocaleRoute) {
|
|
33
|
-
|
|
33
|
+
if (router.hasRoute(`localized-${defaultRouteName}-${currentLocale}`)) {
|
|
34
|
+
defaultRouteName = `localized-${defaultRouteName}-${currentLocale}`;
|
|
35
|
+
} else {
|
|
36
|
+
defaultRouteName = `localized-${defaultRouteName}`;
|
|
37
|
+
}
|
|
34
38
|
newParams.locale = i18nConfig.defaultLocale;
|
|
35
39
|
newParams.name = defaultRouteName;
|
|
36
40
|
}
|
|
@@ -9,6 +9,11 @@ export default defineEventHandler(async (event) => {
|
|
|
9
9
|
const locales = i18nConfig.locales || [];
|
|
10
10
|
const pathParts = event.path.split("/").filter(Boolean);
|
|
11
11
|
const localeCode = pathParts[0];
|
|
12
|
+
const lastPart = pathParts[pathParts.length - 1];
|
|
13
|
+
const hasFileExtension = /\.[^/?]+(?:\?.*)?$/.test(lastPart);
|
|
14
|
+
if (hasFileExtension) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
12
17
|
const locale = locales.find((loc) => loc.code === localeCode);
|
|
13
18
|
if (!locale) {
|
|
14
19
|
const newPath = `/${i18nConfig.defaultLocale}/${pathParts.join("/")}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-i18n-micro",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"description": "Nuxt I18n Micro is a lightweight, high-performance internationalization module for Nuxt, designed to handle multi-language support with minimal overhead, fast build times, and efficient runtime performance.",
|
|
5
5
|
"repository": "s00d/nuxt-i18n-micro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"12fb941a-fcb7-4438-a5ba-415cd42d46f9","timestamp":1725088672978,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|