Skip to content

Commit

Permalink
fix: outputs and type in astro-i18n
Browse files Browse the repository at this point in the history
Closes #10743
  • Loading branch information
ArmandPhilippot committed Jan 24, 2025
1 parent 7ad1b1d commit 39e4f8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/content/docs/en/reference/modules/astro-i18n.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ getRelativeLocaleUrl("fr");
// returns /fr
getRelativeLocaleUrl("fr", "");
// returns /fr
// returns /fr/
getRelativeLocaleUrl("fr", "getting-started");
// returns /fr/getting-started
Expand All @@ -82,7 +82,7 @@ getRelativeLocaleUrl("fr_CA", "getting-started", {

<p>

**Type:** `(locale: string, path: string, options?: GetLocaleOptions) => string`
**Type:** `(locale: string, path?: string, options?: GetLocaleOptions) => string`
</p>

Use this function to retrieve an absolute path for a locale when [`site`] has a value. If [`site`] isn't configured, the function returns a relative URL. If the locale doesn't exist, Astro throws an error.
Expand All @@ -98,7 +98,7 @@ getAbsoluteLocaleUrl("fr");
// returns https://example.com/fr
getAbsoluteLocaleUrl("fr", "");
// returns https://example.com/fr
// returns https://example.com/fr/
getAbsoluteLocaleUrl("fr", "getting-started");
// returns https://example.com/fr/getting-started
Expand Down

0 comments on commit 39e4f8a

Please sign in to comment.