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

To help you get started, we’ve selected a few @ngneat/transloco-locale 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 { 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({
    //   loader: HttpLoader,
    //   storage: {

@ngneat/transloco-locale

The localization (l10n) library plugin for Transloco

MIT
Latest version published 2 years ago

Package Health Score

62 / 100
Full package analysis

Popular @ngneat/transloco-locale functions