생성: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 Polyglot.js to Intlayer
If you are using Airbnb's Polyglot.js, migrating to Intlayer is extremely straightforward using the compat layer.
What to do
Simply run the initialization command in your project:
bash
코드 복사
코드를 클립보드에 복사
npx intlayer initThis generates intlayer.config.ts. You can then utilize the bundler plugin alias to transparently redirect Polyglot imports to @intlayer/polyglot.
What it does under the hood
Polyglot.js syntax typically relies on polyglot.t('key', {name}) with %{name} interpolations and smart_count plurals separated by "singular |||| plural".
Under the hood:
- Interpolation: The compat layer handles
%{var}placeholders natively. - Plurals: The string is split at
||||and evaluated against nativeIntl.PluralRulesaccording to the active locale, mirroring Polyglot's own bucket order per locale. - Dictionaries: You bypass the need to provide huge JSON configurations to
new Polyglot()– Intlayer handles the dictionaries dynamically and prunes them automatically.