Skip to content

Commit 94ac4b9

Browse files
i18n(zh-cn): Update astro-i18n.mdx (#10830)
Co-authored-by: Armand Philippot <[email protected]>
1 parent 2509b02 commit 94ac4b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/content/docs/zh-cn/reference/modules/astro-i18n.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ getRelativeLocaleUrl("fr");
6262
// 返回 /fr
6363
6464
getRelativeLocaleUrl("fr", "");
65-
// 返回 /fr
65+
// 返回 /fr/
6666
6767
getRelativeLocaleUrl("fr", "getting-started");
6868
// 返回 /fr/getting-started
@@ -84,7 +84,7 @@ getRelativeLocaleUrl("fr_CA", "getting-started", {
8484

8585
<p>
8686

87-
**类型:**`(locale: string, path: string, options?: GetLocaleOptions) => string`
87+
**类型:**`(locale: string, path?: string, options?: GetLocaleOptions) => string`
8888
</p>
8989

9090
[`site`] 配置了值时,使用这个函数来检索一个语言环境的绝对路径。如果 [`site`] 没有被配置,该函数将返回一个相对 URL。如果语言环境不存在,Astro 会抛出一个错误。
@@ -100,7 +100,7 @@ getAbsoluteLocaleUrl("fr");
100100
// 返回 https://example.com/fr
101101
102102
getAbsoluteLocaleUrl("fr", "");
103-
// 返回 https://example.com/fr
103+
// 返回 https://example.com/fr/
104104
105105
getAbsoluteLocaleUrl("fr", "getting-started");
106106
// 返回 https://example.com/fr/getting-started

0 commit comments

Comments
 (0)