UNPKG

nunjucks-translation

Version:
21 lines (20 loc) 696 B
import { Extension, runtime } from 'nunjucks'; import SafeString = runtime.SafeString; export declare class TranslationExtension implements Extension { private readonly options; constructor(options?: TranslationExtensionOptions); get tags(): string[]; parse(parser: any, nodes: any, lexer: any): any; trans(...args: any): SafeString; translateText(textId: string, locale: string, params: object): string; private escapeRegExp; private replaceAll; private translationExistsForLocale; private selectLocale; private getPathValue; } export interface TranslationExtensionOptions { translations: object; locale: string; fallbackLocale: string; }