How to use @ngneat/transloco-messageformat - 1 common examples

To help you get started, we’ve selected a few @ngneat/transloco-messageformat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngneat / transloco / src / app / app.module.ts View on Github external
import { AppComponent } from './app.component';
import { TranslocoModule, TRANSLOCO_CONFIG, translocoConfig } from '@ngneat/transloco';
import { HttpClientModule } from '@angular/common/http';
import { HomeComponent } from './home/home.component';
import { OnPushComponent } from './on-push/on-push.component';
import { httpLoader } from './loaders/http.loader';
import { environment } from '../environments/environment';
import { TranslocoMessageFormatModule } from '@ngneat/transloco-messageformat';

@NgModule({
  declarations: [AppComponent, HomeComponent, OnPushComponent],
  imports: [
    BrowserModule,
    AppRoutingModule,
    TranslocoModule,
    TranslocoMessageFormatModule.init(),
    HttpClientModule,
    TranslocoLocaleModule.init({
      langToLocaleMapping: {
        en: 'en-US',
        es: 'es-ES'
      }
    })
    // TranslocoPreloadLangsModule.preload(['es', 'todos-page'])
    // TranslocoPersistLangModule.init({
    //   getLangFn,
    //   storage: {
    //     provide: TRANSLOCO_PERSIST_LANG_STORAGE,
    //     useValue: localStorage
    //   }
    // }),
    // TranslocoPersistTranslationsModule.init({

@ngneat/transloco-messageformat

Transpiler for Transloco that uses messageformat.js to compile translations using ICU syntax for handling pluralization and gender

MIT
Latest version published 1 year ago

Package Health Score

64 / 100
Full package analysis

Popular @ngneat/transloco-messageformat functions