C15T Logo

useTranslations

The useTranslations hook provides access to the consent manager's translations.

tocOn this page

The useTranslations hook provides access to the consent manager's translations found in the store and updates when the translations change.

Usage

function MyComponent() {
  const translations = useTranslations();
  
  const title = translations.cookieBanner.title;
  // Use the translations in your component
  return <h1>{title}</h1>;
}

Returns

The useTranslations hook returns the translations object.

Translations

Property
Types

CommonTranslations

Property
Types

CookieBannerTranslations

Property
Types

ConsentManagerDialogTranslations

Property
Types

ConsentTypeTranslations

Property
Types