Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 527 Bytes

README.md

File metadata and controls

27 lines (23 loc) · 527 Bytes

Description

Use po files with ng2-translate

Usage:

import { Http } from '@angular/http';

import { TranslatePoLoader } from '@biesbjerg/ng2-translate-po-loader';

export function createTranslateLoader(http: Http) {
	return new TranslatePoLoader(http, 'assets/i18n', '.po');
}

@NgModule({
	imports: [
		BrowserModule,
		HttpModule,
		TranslateModule.forRoot({
			provide: TranslateLoader,
			useFactory: createTranslateLoader,
			deps: [Http]
		})
	],
	bootstrap: [AppComponent]
})
export class AppModule { }