填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

TRANSLATIONS

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.

查看"说明"...

      
      const TRANSLATIONS: InjectionToken<string>;
    

说明

See the i18n guide for more information.

使用说明

Example

import { TRANSLATIONS } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app/app.module'; // content of your translation file const translations = '....'; platformBrowserDynamic().bootstrapModule(AppModule, { providers: [{provide: TRANSLATIONS, useValue: translations }] });
      
      import { TRANSLATIONS } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';

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

platformBrowserDynamic().bootstrapModule(AppModule, {
  providers: [{provide: TRANSLATIONS, useValue: translations }]
});