Intlayer Astro Usage
Setup
Server-side (Astro Components)
---
import { getIntlayer } from "astro-intlayer";
const content = await getIntlayer("my-dictionary-key");
---
<h1>{content.title}</h1>
将Intlayer国际化与Astro应用程序集成。当用户要求“设置Astro i18n”时使用,或在Astro组件中使用“getIntlayer”,以及在Astro中管理服务器端内容时使用。
---
import { getIntlayer } from "astro-intlayer";
const content = await getIntlayer("my-dictionary-key");
---
<h1>{content.title}</h1>