We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8f27d3 commit 51b6481Copy full SHA for 51b6481
src/content/docs/en/reference/modules/astro-i18n.mdx
@@ -356,6 +356,8 @@ Replaces underscores (`_`) with hyphens (`-`) in the given locale before returni
356
import { normalizeTheLocale } from "astro:i18n";
357
358
normalizeTheLocale("it_VT") // returns `it-vt`
359
+// Assuming the current locale is `"pt-PR"`:
360
+normalizeTheLocale(Astro.currentLocale) // returns `pt-pt`
361
---
362
```
363
@@ -388,6 +390,7 @@ import { pathHasLocale } from "astro:i18n";
388
390
389
391
pathHasLocale("italiano"); // returns `true`
392
pathHasLocale("es"); // returns `true`
393
+pathHasLocale('/es/blog/'); // returns `true`
394
pathHasLocale("it-VT"); // returns `false`
395
396
0 commit comments