Skip to content

Commit

Permalink
i18n(zh-cn): Update i18n.mdx (#8602)
Browse files Browse the repository at this point in the history
  • Loading branch information
liruifengv committed Jun 20, 2024
1 parent 9596625 commit 08fe5d2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/content/docs/zh-cn/recipes/i18n.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import StaticSsrTabs from '~/components/tabs/StaticSsrTabs.astro';

如果你希望默认语言不像其他语言那样在 URL 中可见,后续会有 [关于隐藏默认语言的介绍](/zh-cn/recipes/i18n/#在-url-中隐藏默认语言)

<ReadMore> 请参阅 [参考资料部分](#参考资料) 以获取与之相关的外部链接,例如从右到左(RTL)样式和选择语言标签。</ReadMore>

## 操作步骤

### 为页面设置多语言
Expand All @@ -36,7 +38,7 @@ import StaticSsrTabs from '~/components/tabs/StaticSsrTabs.astro';
- index.astro
- index.astro
</FileTree>

2. 设置 `src/pages/index.astro` 重定向到你的默认语言。

<StaticSsrTabs>
Expand Down Expand Up @@ -509,9 +511,9 @@ import StaticSsrTabs from '~/components/tabs/StaticSsrTabs.astro';
```
</Steps>

## 参考
## 参考资料
- [选择语言标签](https://www.w3.org/International/questions/qa-choosing-language-tags)
- [Right-to-left Styling 101](https://rtlstyling.com/)
- [从右到左的 (RTL) 样式 101](https://rtlstyling.com/)

## 其他第三方库
- [astro-i18next](https://github.com/yassinedoghri/astro-i18next) — 为 i18next 提供的 Astro 集成,包括一些实用组件。
Expand Down

0 comments on commit 08fe5d2

Please sign in to comment.