ngx-translate-formatjs-compiler
Version:
[Format.js](https://formatjs.io/) based [@ngx/translate](https://github.com/ngx-translate/core) compiler.
18 lines (17 loc) • 830 B
TypeScript
import { TranslateCompiler } from '@ngx-translate/core';
import * as i0 from "@angular/core";
export declare class TranslateFormatJsCompiler extends TranslateCompiler {
/** Compiles single translation */
compile(value: string, lang: string): string | ((params?: Record<string, unknown>) => any);
/** Compile translations object */
compileTranslations(translations: any, lang: string): any;
/**
* Traverse through object and replace translations strings with compile function.
* @param obj to be traversed
* @param lang from @ngx-translate
* @returns translation object with compile functions.
*/
private compileRecursively;
static ɵfac: i0.ɵɵFactoryDeclaration<TranslateFormatJsCompiler, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<TranslateFormatJsCompiler>;
}