Multiple Languages Simultaneously
Setting Language in a Component's Providers
my-comp.component.ts
@Component({
selector: 'my-comp',
templateUrl: './my-comp.component.html',
providers: [provideTranslocoLang('es')],
})
export class MyComponent {}Specifying Language Directly in a Template
my-comp.component.html
<ng-container *transloco="let t; lang: 'en'">
<p>Inline (en) wins: {{ t('home') }}</p>
</ng-container>Using a Static Language
Setting in a Component:
Setting Directly in a Template:
Was this helpful?

