Skip to main content

Internationalization (i18n) Support

The Consent Manager default interface supports internationalization (i18n) with customizable text messages for various components and interfaces.

This format is designed to be compatible with popular React translation frameworks, including react-i18n, react-intl, LinguiJS, among others.

Default Messages

A set of default messages is provided, which can be overridden as needed. These include messages for general interface elements, forms, fallback components, and integration defaults.

You can find the latest default messages in the source code.

Example Customization

You can customize messages by passing a messages prop to ConsentManagerDefaultInterface:

import { defaultMessages } from '@consent-manager/interface-default'

const customMessages = {
...defaultMessages,
'consent-manager.close': 'Close',
// ... other customized messages
}

;<ConsentManagerDefaultInterface messages={customMessages}>
{/* Rest of your application */}
</ConsentManagerDefaultInterface>