1.0.2 • Published 7 years ago

@jgornick/ngx-translate-po-http-loader v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

Description

Load po files for use with ngx-translate

Usage:

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

import { TranslatePoHttpLoader } from '@biesbjerg/ngx-translate-po-http-loader';

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

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