GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Docs
  • Tutorials
  • Playground
  • Reference
  • code

This view

  • Original page
  • New address

GeezerVison is showing next.angular.dev — TRANSLATIONS • Angular

API

    
      const TRANSLATIONS: InjectionToken<string>;
    
    

Description

Use this token at bootstrap to provide the content of your translation file (xtb, xlf or xlf2) when you want to translate your application in another language.

See the i18n guide for more information.

Usage Notes

Example

In standalone apps:

import { LOCALE_ID, ApplicationConfig } from '@angular/core';

const appConfig: ApplicationConfig = {
  providers: [{provide: TRANSLATIONS, useValue: translations }]
};

In module based apps:

import { TRANSLATIONS } from '@angular/core';
import { platformBrowser } from '@angular/platform-browser';
import { AppModule } from './app/app.module';

// content of your translation file
const translations = '....';

platformBrowser().bootstrapModule(AppModule, {
  providers: [{provide: TRANSLATIONS, useValue: translations }]
});
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.