### File

`src/angular-forms-translate-loader.ts`

### Implements

`TranslateLoader`

### Index

###### Methods
Public getTranslation

### Methods

Public getTranslation
`getTranslation(lang: string)`
Defined in src/angular-forms-translate-loader.ts:23
Parameters :
Name | Type | Optional | Description
lang | `string` |  |
Returns : `Observable<any>`

    import { TranslateLoader } from '@ngx-translate/core';
    import { Observable } from 'rxjs/Observable';

    const i18n: { [lang: string]: Object } = {
      'en-US': {
        'ACTION': 'Action',
        'ADD': 'Add',
        'NO_REGISTERS': 'No registers',
        'NOT_INFORMED': 'Not informed',
        'REMOVE': 'Remove'
      },
      'pt-BR': {
        'ACTION': 'Ação',
        'ADD': 'Adicionar',
        'NO_REGISTERS': 'Nenhum registro encontrado',
        'NOT_INFORMED': 'Não informado(a)',
        'REMOVE': 'Remover'
      }
    };

    export class AngularFormsTranslateLoader implements TranslateLoader {

      public getTranslation(lang: string): Observable<any> {
        return Observable.of(i18n[lang]);
      }
    }

# results matching ""

# No results matching ""