### File

`projects/angular-l10n/src/lib/directives/l10n-translate.directive.ts`

### Metadata

Selector | `[l10nTranslate],[translate]`

### Index

###### Methods

- Protected getValue

###### Inputs

- l10nTranslate
- params
- translate

###### Accessors

- l10nTranslate
- translate

### Constructor

`constructor(el: ElementRef, renderer: Renderer2, translation: L10nTranslationService)`
Defined in projects/angular-l10n/src/lib/directives/l10n-translate.directive.ts:18

Parameters :

Name | Type | Optional
el | `ElementRef` | No
renderer | `Renderer2` | No
translation | `L10nTranslationService` | No

### Inputs

l10nTranslate
Type : `any`
Defined in projects/angular-l10n/src/lib/directives/l10n-translate.directive.ts:11

params
Type : `any`
Defined in projects/angular-l10n/src/lib/directives/l10n-translate.directive.ts:18

translate
Type : `any`
Defined in projects/angular-l10n/src/lib/directives/l10n-translate.directive.ts:14

### Methods

Protected getValue
`getValue(text: string)`
Defined in projects/angular-l10n/src/lib/directives/l10n-translate.directive.ts:24

Parameters :

Name | Type | Optional
text | `string` | No

Returns : `string`

### Accessors

l10nTranslate
set `l10nTranslate(params: any)`
Defined in projects/angular-l10n/src/lib/directives/l10n-translate.directive.ts:11

Parameters :

Name | Type | Optional
params | `any` | No

Returns : `void`

translate
set `translate(params: any)`
Defined in projects/angular-l10n/src/lib/directives/l10n-translate.directive.ts:14

Parameters :

Name | Type | Optional
params | `any` | No

Returns : `void`

    import { Directive, Input, ElementRef, Renderer2 } from '@angular/core';

    import { L10nDirective } from '../models/l10n-directive';
    import { L10nTranslationService } from '../services/l10n-translation.service';

    @Directive({
        selector: '[l10nTranslate],[translate]'
    })
    export class L10nTranslateDirective extends L10nDirective {

        @Input() set l10nTranslate(params: any) {
            this.params = params;
        }
        @Input() set translate(params: any) {
            this.params = params;
        }

        @Input() public params: any;

        constructor(protected el: ElementRef, protected renderer: Renderer2, protected translation: L10nTranslationService) {
            super(el, renderer, translation);
        }

        protected getValue(text: string): string {
            return this.translation.translate(text, this.params, this.language);
        }

    }

# result-matching ""

# No results matching ""