Translation API
A list of the TranslocoService API methods and their usages
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()
translateObject()
selectTranslateObject()
getTranslation()
selectTranslation()
setTranslation()
setTranslationKey()
events$
Last updated
Was this helpful?

