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.
16 lines (15 loc) • 535 B
TypeScript
import type { H3Event } from 'h3';
export interface DetectCurrentLocaleConfig {
fallbackLocale?: string;
defaultLocale?: string;
locales?: {
code: string;
}[];
localeCookie?: string | null;
autoDetectLanguage?: boolean;
}
/**
* Detects the current locale based on various sources (server-only).
* Thin wrapper around `resolveServerLocale` with configured cookie name.
*/
export declare const detectCurrentLocale: (event: H3Event, config: DetectCurrentLocaleConfig, defaultLocale?: string) => string;