/** * Hook for language-aware navigation in i18n applications */ /** * Add language prefix to a path */ export declare function addLanguageToPath(path: string, lang: string): string; /** * Remove language prefix from a path * Assumes language codes are 2 lowercase letters, optionally followed by -xx */ export declare function removeLanguageFromPath(path: string, isLanguageSupported?: (lang: string) => boolean): string; export interface UseLocalizedNavigateOptions { /** * Function to check if a language code is supported * If not provided, any 2-letter code is considered valid */ isLanguageSupported?: (lang: string) => boolean; /** * Default language to use if none is detected * @default 'en' */ defaultLanguage?: string; /** * localStorage key for persisting language preference * @default 'language' */ storageKey?: string; } export interface UseLocalizedNavigateReturn { /** * Navigate to a path with the current language prefix */ navigate: (to: string | number, options?: { replace?: boolean; state?: unknown; }) => void; /** * Switch to a different language and navigate to the same page in that language */ switchLanguage: (newLanguage: string, currentPath?: string) => void; /** * The current language */ currentLanguage: string; } /** * Hook for language-aware navigation * * @param options - Configuration options * @returns Navigation functions and current language */ export declare function useLocalizedNavigate(options?: UseLocalizedNavigateOptions): UseLocalizedNavigateReturn; export default useLocalizedNavigate; //# sourceMappingURL=useLocalizedNavigate.d.ts.map