TranslateDirective
Provides access to the translation service. Using as structural directive:
<ng-container *translate="let t; node: 'keyRoot'; let l = localize">
<p>{{ t( 'key', values? ) }}</p>
<p>{{ l.number( number, 'options' ) }}</p>
</ng-container>
-
node: string
-
The optional beginning of the text identifier for all calls.
-
localize: LocalizeContext
-
A helper object with methods to support localization.
-
key: string
-
The identifier of the text. If node is defined, then node and key are merged.
-
values: object | Array<string> | string | number | Boolean
-
The optional value or values to interpolate into the localized text.
Using as attribute directive:
<p translate="key" [translateParams]="values"></p>
-
translate: string
-
The identifier of the text.
-
translateParams: object | Array<string> | string | number | Boolean
-
The optional value or values to interpolate into the localized text.