{"library":"ngx-translate-messageformat-compiler","title":"ngx-translate-messageformat-compiler","description":"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.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install ngx-translate-messageformat-compiler"],"cli":null},"imports":["import { TranslateMessageFormatCompiler } from 'ngx-translate-messageformat-compiler'","import { MESSAGE_FORMAT_CONFIG } from 'ngx-translate-messageformat-compiler'","import { TranslateMessageFormatCompiler } from 'ngx-translate-messageformat-compiler'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { provideTranslateCompiler, provideTranslateService } from '@ngx-translate/core';\nimport { TranslateMessageFormatCompiler, MESSAGE_FORMAT_CONFIG } from 'ngx-translate-messageformat-compiler';\nimport { MyAppComponent } from './my-app.component';\n\nbootstrapApplication(MyAppComponent, {\n  providers: [\n    provideTranslateService({\n      compiler: provideTranslateCompiler(TranslateMessageFormatCompiler),\n    }),\n    {\n      provide: MESSAGE_FORMAT_CONFIG,\n      useValue: {\n        throwOnError: true,\n        formatters: { upcase: (v) => v.toUpperCase() },\n      },\n    },\n  ],\n});","lang":"typescript","description":"Setup ngx-translate-messageformat-compiler in Angular standalone bootstrap with custom config","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}