UNPKG

angular-l10n

Version:

An Angular library to translate messages, dates and numbers

33 lines (32 loc) 1.04 kB
import { LocaleService } from "../services/locale.service"; import { L10nConfigRef } from "./l10n-config"; export declare class LocalizedRouting { private configuration; private locale; private readonly router; private readonly location; constructor(configuration: L10nConfigRef, locale: LocaleService); init(): void; /** * Parses path to find the locale. * @param path The path to be parsed */ private parsePath; /** * Removes the locale from the path and navigates without pushing a new state into history. * @param path Localized path */ private redirectToPath; /** * Replaces the path with the locale without pushing a new state into history. * @param locale The current locale * @param path The path to be replaced */ private replacePath; private getLocalizedSegment; private splitLocale; private compareLocale; private getSchema; private isDefaultRouting; private getLocalizedPath; }