@c15t/react
Version:
Developer-first CMP for React: cookie banner, consent manager, preferences centre. GDPR ready with minimal setup and rich customization
29 lines • 811 B
TypeScript
import type { Translations } from 'c15t';
/**
* Hook for accessing translations in the current language.
*
* @remarks
* This hook provides access to the translations for the currently selected language.
* It automatically handles language selection based on the translation configuration.
* Falls back to English if the selected language is not available.
*
* @returns The translations for the current language
*
* @example
* ```tsx
* function CookieBanner() {
* const translations = useTranslations();
*
* return (
* <div>
* <h2>{translations.cookieBanner.title}</h2>
* <p>{translations.cookieBanner.description}</p>
* </div>
* );
* }
* ```
*
* @public
*/
export declare function useTranslations(): Translations;
//# sourceMappingURL=use-translations.d.ts.map