UNPKG

@nuxtjs/i18n

Version:

Internationalization for Nuxt

12 lines (11 loc) 758 B
import type { Locale } from 'vue-i18n'; import type { RouteLocationPathRaw, RouteLocationResolvedGeneric, RouteRecordNameGeneric, Router } from 'vue-router'; /** * Returns a getter function which returns a localized route name for the given route and locale. * The returned function can vary based on the strategy and domain configuration. */ export declare function createLocaleRouteNameGetter(defaultLocale: string): (name: RouteRecordNameGeneric | null, locale: string) => string; /** * Factory function which returns a resolver function based on the routing strategy. */ export declare function createLocalizedRouteByPathResolver(router: Router): (route: RouteLocationPathRaw, locale: Locale) => RouteLocationPathRaw | RouteLocationResolvedGeneric;