{"library":"ngx-translate-formatjs-compiler","title":"ngx-translate-formatjs-compiler","description":"A compiler for @ngx-translate/core that uses FormatJS (intl-messageformat) to enable ICU message syntax in Angular applications. Current stable version is 1.0.8, released in 2023. It supports Angular >=10 and @ngx-translate/core >=13. Key differentiators: provides full ICU message format support (plural, select, number formatting) compared to the default simple key-value interpolation. Release cadence is low (minor updates). Ships TypeScript types.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install ngx-translate-formatjs-compiler"],"cli":null},"imports":["import { TranslateFormatJsCompiler } from 'ngx-translate-formatjs-compiler';","import { TranslateModule, TranslateCompiler } from '@ngx-translate/core';","import { TranslateCompiler } from '@ngx-translate/core';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// app.module.ts\nimport { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { TranslateCompiler, TranslateModule } from '@ngx-translate/core';\nimport { TranslateFormatJsCompiler } from 'ngx-translate-formatjs-compiler';\n\n@NgModule({\n  imports: [\n    BrowserModule,\n    TranslateModule.forRoot({\n      compiler: {\n        provide: TranslateCompiler,\n        useClass: TranslateFormatJsCompiler\n      }\n    })\n  ],\n  bootstrap: [AppComponent]\n})\nexport class AppModule {}\n\n// translation file example (en.json):\n{\n  \"welcome\": \"Hello, {name}! You have {count, plural, one {# message} other {# messages}}.\"\n}","lang":"typescript","description":"Setup of TranslateFormatJsCompiler in Angular app module and example ICU message translation.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}