Skip to main content

paraglide

Inlang 的 Paraglide 是一个基于编译器的国际化库,它提供可摇树优化的消息函数,这些函数具有较小的包大小、无异步瀑布流、完全的类型安全等特点。

¥Paraglide from Inlang is a compiler-based i18n library that emits tree-shakable message functions with small bundle sizes, no async waterfalls, full type-safety, and more.

用法(Usage)

¥Usage

npx sv add paraglide

你将获得什么(What you get)

¥What you get

  • Inlang 项目设置

    ¥Inlang project settings

  • paraglide Vite 插件

    ¥paraglide Vite plugin

  • SvelteKit reroutehandle 钩子

    ¥SvelteKit reroute and handle hooks

  • app.html 中的 text-directionlang 属性

    ¥text-direction and lang attributes in app.html

  • 更新后的 .gitignore

    ¥updated .gitignore

  • 可选的演示页面,展示如何使用 paraglide

    ¥an optional demo page showing how to use paraglide

选项(Options)

¥Options

availableLanguageTags

你希望支持的语言指定为 IETF BCP 47 语言标签。

¥The languages you’d like to support specified as IETF BCP 47 language tags.

npx sv add --paraglide=en,es

demo

是否生成一个可选的演示页面,展示如何使用 paraglide。

¥Whether to generate an optional demo page showing how to use paraglide.

npx sv add --paraglide=demo
上一页 下一页