作成:2026-06-13最終更新:2026-06-13
このドキュメントをあなたの好きなAIアシスタントに参照してくださいChatGPTClaudeDeepSeekGoogle AI modeGeminiPerplexityMistralGrok
このページとあなたの好きなAIアシスタントを使ってドキュメントを要約します
バージョン履歴
- "Init history"v9.0.02026/6/13
このページのコンテンツはAIを使用して翻訳されました。
英語の元のコンテンツの最新バージョンを見るEdit this doc
If you have an idea for improving this documentation, please feel free to contribute by submitting a pull request on GitHub.
GitHub link to the documentationCopy
Copy doc Markdown to clipboard
Migrate from Svelte I18n to Intlayer
Moving your Svelte application from svelte-i18n to Intlayer takes just a moment using the compat adapter.
What to do
Simply run the initialization command in your project:
bash
コードをコピー
コードをクリップボードにコピー
npx intlayer initThis generates intlayer.config.ts. Ensure your SvelteKit / Vite plugins are wrapped with Intlayer's alias plugin to seamlessly map svelte-i18n to @intlayer/svelte-i18n.
What it does under the hood
Svelte-i18n relies on heavily used stores ($_, $t, $format, etc.) and ICU MessageFormat.
Under the hood:
- Stores: Intlayer proxies the
svelte-i18nstores.$_becomes a derived store of the current locale returning an Intlayer resolver. - Keys: Your flat keys (e.g.
$_('home.title')) are evaluated such that the first path segment represents the Intlayer dictionary. - ICU Syntax: Fully handled by the shared ICU resolver (
intl-messageformatequivalent parsing). - Formatters:
$date,$time,$numbercalls redirect safely to Intlayer's native core formatters. - Babel/SWC Analysis: The Intlayer analyzer reads the Svelte store callers (
$_) inside your.sveltesource files before compilation to automatically build the relevant dictionary chunks.