/**
* Language validator route component for i18n routing
* Validates the language parameter and syncs with i18next
*/
export interface LanguageValidatorProps {
/**
* Function to check if a language code is supported
* Required to validate against your app's supported languages
*/
isLanguageSupported: (lang: string) => boolean;
/**
* Default language to redirect to when invalid
* @default 'en'
*/
defaultLanguage?: string;
/**
* localStorage key for persisting language preference
* @default 'language'
*/
storageKey?: string;
/**
* Custom fallback component to render instead of null during redirect
*/
fallback?: React.ReactNode;
}
/**
* Route wrapper that validates the language parameter and syncs i18n.
* Use this as a parent route to wrap all language-prefixed routes.
*
* @example
* ```tsx
* // In your router config
* const router = createBrowserRouter([
* {
* path: '/:lang',
* element: ,
* children: [
* { path: '', element: },
* { path: 'about', element: },
* ],
* },
* ]);
* ```
*/
export declare function LanguageValidator({ isLanguageSupported, defaultLanguage, storageKey, fallback, }: LanguageValidatorProps): React.ReactElement | null;
export default LanguageValidator;
//# sourceMappingURL=LanguageValidator.d.ts.map