Skip to content

Commit 51b6481

Browse files
Apply HiDeoo suggestions
Co-authored-by: HiDeoo <[email protected]>
1 parent a8f27d3 commit 51b6481

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/content/docs/en/reference/modules/astro-i18n.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,8 @@ Replaces underscores (`_`) with hyphens (`-`) in the given locale before returni
356356
import { normalizeTheLocale } from "astro:i18n";
357357
358358
normalizeTheLocale("it_VT") // returns `it-vt`
359+
// Assuming the current locale is `"pt-PR"`:
360+
normalizeTheLocale(Astro.currentLocale) // returns `pt-pt`
359361
---
360362
```
361363

@@ -388,6 +390,7 @@ import { pathHasLocale } from "astro:i18n";
388390
389391
pathHasLocale("italiano"); // returns `true`
390392
pathHasLocale("es"); // returns `true`
393+
pathHasLocale('/es/blog/'); // returns `true`
391394
pathHasLocale("it-VT"); // returns `false`
392395
---
393396
```

0 commit comments

Comments
 (0)