استخدم مساعدك المفضل للملخص واستخدم هذه الصفحة والموفر AI الذي تريده
تاريخ الإصدارات
- "Init history"v9.0.0١٣/٦/٢٠٢٦
تمت ترجمة محتوى هذه الصفحة باستخدام الذكاء الاصطناعي.
اعرض آخر نسخة المحتوى الأصلي باللغة الإنكليزية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 doc Markdown to clipboard
Migrate from Transloco to Intlayer
If your Angular application currently uses @jsverse/transloco, you can migrate to Intlayer using our compat adapter. This transition allows you to maintain your existing template syntax while utilizing Intlayer's powerful dictionary structure.
What to do
Simply run the initialization command in your project:
نسخ الكود إلى الحافظة
npx intlayer initThis will generate the necessary intlayer.config.ts configuration. You will then replace your Transloco imports with @intlayer/transloco modules or rely on the build aliases.
What it does under the hood
Transloco uses scopes and a TranslocoService (translate, selectTranslate), alongside structural directives (*transloco="let t") and pipes (| transloco).
Under the hood:
- Scopes: Map naturally to Intlayer dictionary keys, providing a great pruning story for bundle optimization.
- Service & Directives: Intlayer's Angular adapter seamlessly replaces the providers, allowing your existing template pipes and directives to resolve strings against Intlayer dictionaries.
- Build time parsing: The TypeScript analyzer recognizes
instant/getcalls, and fallback pruning ensures correctness even when template usage isn't statically trackable.