UNPKG

@ngneat/transloco

Version:

The internationalization (i18n) library for Angular

21 lines (20 loc) 954 B
import { TranslocoService } from './transloco.service'; import { InlineLoader, TranslocoScope } from './types'; export declare function getScopeFromLang(lang: string): string; export declare function getLangFromScope(lang: string): string; /** * @example * * getPipeValue('todos|scoped', 'scoped') [true, 'todos'] * getPipeValue('en|static', 'static') [true, 'en'] * getPipeValue('en', 'static') [false, 'en'] */ export declare function getPipeValue(str: string, value: string, char?: string): [boolean, string]; export declare function shouldListenToLangChanges(service: TranslocoService, lang: string): boolean; export declare function listenOrNotOperator(listenToLangChange: boolean): (source: any) => any; export declare function resolveInlineLoader(providerScope: TranslocoScope | null, scope: string): InlineLoader | null; export declare function getEventPayload(lang: string): { scope: string; langName: string; lang: string; };