생성: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
i18n-js에서 Intlayer로 마이그레이션
i18n-js 라이브러리에서 Intlayer로 전환하는 것은 큰 translations 설정을 Intlayer의 구조화된 파일 resolution 시스템으로 offload하도록 설계된 고도로 최적화된 마이그레이션입니다.
해야 할 일
리포지토리에서 다음 설정 명령을 실행하세요:
bash
코드 복사
코드를 클립보드에 복사
npx intlayer initintlayer.config.ts가 준비되면 bundler 설정에 Intlayer alias를 추가하여 i18n-js의 모든 imports가 compat package @intlayer/i18n-js를 대상으로 하도록 할 수 있습니다.
내부적으로 어떻게 작동하는지
i18n-js는 i18n.t('scope.key', {name})과 같은 표현식을 통해 namespaces에 접근하며, locale fallbacks와 특정 plural mappings과 함께 합니다.
내부적으로:
- Interpolation: compat adapter는
%{name}mappings을 targeted runtime dictionary value로 쉽게 파싱합니다. - Pluralization:
one/othersubkeys를 교체하고 Intlayer의 강력한 underlying plural mechanisms (Intl.PluralRules)에 대해 매핑하여 수동 mappings을 추상화합니다. - Locales: bootstrap 시점에 monolithic language payloads를 로드하는 대신 dictionaries는 native Intlayer 설정을 통해 현재 context 설정에 따라 최적으로 제공됩니다.