nuxt-i18n-micro
Version:
Nuxt I18n Micro is a lightweight, high-performance internationalization module for Nuxt, designed to handle multi-language support with minimal overhead, fast build times, and efficient runtime performance.
18 lines (15 loc) • 1.42 kB
text/typescript
import { NuxtPage } from '@nuxt/schema';
import { LocaleCode, Locale } from 'nuxt-i18n-micro-types';
declare const isInternalPath: (p: string) => boolean;
declare function extractLocaleRoutes(content: string, filePath: string): Record<string, string> | null;
declare function validateDefineI18nRouteConfig(obj: Record<LocaleCode, Record<string, string>>): boolean;
declare const normalizePath: (routePath: string) => string;
declare const cloneArray: <T extends object>(array: T[]) => T[];
declare const isPageRedirectOnly: (page: NuxtPage) => boolean;
declare const removeLeadingSlash: (routePath: string) => string;
declare const buildRouteName: (baseName: string, localeCode: string, isCustom: boolean) => string;
declare const shouldAddLocalePrefix: (locale: string, defaultLocale: Locale, addLocalePrefix: boolean, includeDefaultLocaleRoute: boolean) => boolean;
declare const isLocaleDefault: (locale: string | Locale, defaultLocale: Locale, includeDefaultLocaleRoute: boolean) => boolean;
declare const buildFullPath: (locale: string | string[], basePath: string, customRegex?: string | RegExp) => string;
declare const buildFullPathNoPrefix: (basePath: string) => string;
export { buildFullPath, buildFullPathNoPrefix, buildRouteName, cloneArray, extractLocaleRoutes, isInternalPath, isLocaleDefault, isPageRedirectOnly, normalizePath, removeLeadingSlash, shouldAddLocalePrefix, validateDefineI18nRouteConfig };