@compodoc/compodoc
Version:
The missing documentation tool for your Angular application
16 lines (12 loc) • 457 B
text/typescript
import * as Handlebars from 'handlebars';
import { IHtmlEngineHelper, IHandlebarsOptions } from './html-engine-helper.interface';
import I18nEngine from '../i18n.engine';
export class I18nHelper implements IHtmlEngineHelper {
public helperFunc(context: any, i18n_key: string) {
if (I18nEngine.exists(i18n_key)) {
return I18nEngine.translate(i18n_key.toLowerCase());
} else {
return i18n_key;
}
}
}