Compiler for ngx-translate that uses messageformat.js to compile translations using ICU syntax for handling pluralization and gender. Current stable version is 7.2.0, released under an MIT license with monthly releases. Key differentiators: supports Angular 13+, ngx-translate 14-17, and messageformat 3; provides MESSAGE_FORMAT_CONFIG token for custom formatters and options; enables ICU pluralization and gender selection in ngx-translate projects. Requires unsafe-eval CSP for runtime compilation.
npm install ngx-translate-messageformat-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Setup ngx-translate-messageformat-compiler in Angular standalone bootstrap with custom config
Add 'unsafe-eval' to script-src Content-Security-Policy header
Update peer dependencies to match required versions
Upgrade to v7 and use MESSAGE_FORMAT_CONFIG token
Use MESSAGE_FORMAT_CONFIG keys as documented, not raw MessageFormat option names
Use ICU syntax like {{ count, plural, =1 {one} other {# other} }} instead of ngx-translate native interpolationSwitch to ESM import syntax: import { TranslateMessageFormatCompiler } from 'ngx-translate-messageformat-compiler'Add { provide: MESSAGE_FORMAT_CONFIG, useValue: {...} } to providers array