UNPKG

608 BPlain TextView Raw
1import {Injectable} from "@angular/core";
2
3export abstract class TranslateCompiler {
4 abstract compile(value: string, lang: string): string | Function;
5
6 abstract compileTranslations(translations: any, lang: string): any;
7}
8
9/**
10 * This compiler is just a placeholder that does nothing, in case you don't need a compiler at all
11 */
12@Injectable()
13export class TranslateFakeCompiler extends TranslateCompiler {
14 compile(value: string, lang: string): string | Function {
15 return value;
16 }
17
18 compileTranslations(translations: any, lang: string): any {
19 return translations;
20 }
21}