Translation API
A list of the TranslocoService API methods and their usages
translate()
translate()app.component.ts
export class AppComponent {
constructor(private translocoService: TranslocoService) {}
ngOnInit() {
this.translocoService.translate('hello');
this.translocoService.translate('hello', { value: 'world' });
this.translocoService.translate(['hello', 'key']);
this.translocoService.translate('hello', params, 'es');
// Translate a key from a specific scope
this.translocoService.translate('hello', params, 'todos/en');
}
}selectTranslate()
selectTranslate()translateObject()
translateObject()selectTranslateObject()
selectTranslateObject()getTranslation()
getTranslation()selectTranslation()
selectTranslation()setTranslation()
setTranslation()setTranslationKey()
setTranslationKey()events$
events$Last updated
Was this helpful?

