Localizing the Inbox component

Learn how to customize the Inbox UI for different languages using the localization prop.

Localize the UI text of the Inbox component to align with your product’s voice or support multiple languages. This helps create a more consistent, accessible experience for subscribers across different regions.

Localization only updates the UI text in the Inbox. It doesn’t translate the content of your notifications. To send messages in different languages, use the Translations.

Using the localization prop

Override the default text in the Inbox component UI by passing a localization prop. This prop accepts an object of key-value pairs, where each key maps to a specific UI element and each value is your custom string.

If you omit any keys, the component will fall back to the default en-US values.

Overriding the default text in the Inbox component UI using localization prop

import { Inbox } from '@novu/react';
 
function NovuInbox() {
  return (
    <Inbox
      applicationIdentifier="YOUR_APPLICATION_IDENTIFIER"
      subscriberId="YOUR_SUBSCRIBER_ID"
      localization={{
        'inbox.filters.dropdownOptions.unread': 'Unread only',
        'notification.actions.archive.tooltip': 'Move to archive',
        'preferences.title': 'My Preferences',
        locale: 'en-US',
      }}
    />
  );
}
 
export default NovuInbox;
Localization is also fully supported in @novu/react-native.

Available localization keys

Here is a list of all the keys available for localization, grouped by their respective sections in the Inbox UI.

Filters

KeyDefault ValueDescription
inbox.filters.dropdownOptions.unreadUnread onlyText for the "unread" filter option.
inbox.filters.dropdownOptions.defaultUnread & readText for the default filter option.
inbox.filters.dropdownOptions.archivedArchivedText for the "archived" filter option.
inbox.filters.dropdownOptions.snoozedSnoozedText for the "snoozed" filter option.
inbox.filters.labels.unreadUnreadLabel for the unread tab.
inbox.filters.labels.defaultInboxLabel for the main inbox tab.
inbox.filters.labels.archivedArchivedLabel for the archived tab.
inbox.filters.labels.snoozedSnoozedLabel for the snoozed tab.

Notifications

KeyDefault ValueDescription
notifications.emptyNoticeQuiet for now. Check back later.Message displayed when the notification list is empty.
notifications.actions.readAllMark all as readText for the action to mark all notifications as read.
notifications.actions.archiveAllArchive allText for the action to archive all notifications.
notifications.actions.archiveReadArchive readText for the action to archive all read notifications.
notifications.newNotifications({ notificationCount }: { notificationCount: number }) => `${notificationCount} new notification(s)` A function that returns the string for the new notifications indicator.
notification.snoozedUntilSnoozed untilText displayed before the unsnooze time on a snoozed notification.

Notification actions (Tooltips)

KeyDefault ValueDescription
notification.actions.read.tooltipMark as readTooltip for the "mark as read" action.
notification.actions.unread.tooltipMark as unreadTooltip for the "mark as unread" action.
notification.actions.archive.tooltipArchiveTooltip for the "archive" action.
notification.actions.unarchive.tooltipUnarchiveTooltip for the "unarchive" action.
notification.actions.snooze.tooltipSnoozeTooltip for the "snooze" action.
notification.actions.unsnooze.tooltipUnsnoozeTooltip for the "unsnooze" action.

Snooze menu

KeyDefault ValueDescription
snooze.options.anHourFromNowAn hour from nowText for the "snooze for one hour" option.
snooze.options.inOneDayTomorrowText for the "snooze for one day" option.
snooze.options.inOneWeekNext weekText for the "snooze for one week" option.
snooze.options.customTimeCustom time...Text for the option to open the custom date picker.
snooze.datePicker.timePickerLabelTimeLabel for the time input in the date picker.
snooze.datePicker.applyApplyText for the "Apply" button in the date picker.
snooze.datePicker.cancelCancelText for the "Cancel" button in the date picker.
snooze.datePicker.pastDateTooltipSelected time must be at least 3 minutes in the futureTooltip shown when a past time is selected.
snooze.datePicker.noDateSelectedTooltipPlease select a dateTooltip shown when applying without selecting a date.
snooze.datePicker.exceedingLimitTooltip({days}) => `Selected time cannot exceed ${days === 1 ? '24 hours' : `${days} days`} from nowTooltip shown when the selected date exceeds the allowed snooze duration.

Preferences

KeyDefault ValueDescription
preferences.titlePreferencesThe main title of the preferences screen.
preferences.emptyNoticeNo notification specific preferences yet.Message shown when no workflow preferences are available.
preferences.globalGlobal PreferencesTitle for the global preferences section.
preferences.group.infoApplies to all notifications under this group.Informational text for grouped preferences.
preferences.workflow.disabled.noticeContact admin to enable subscription management for this critical notification.Notice shown for workflows where subscription management is disabled.
preferences.workflow.disabled.tooltipContact admin to editTooltip shown for a disabled workflow preference.

To view the latest and most complete key list, check the defaultLocalization.ts file.

Localizing workflow names in preferences

To display localized names for specific workflows in the Preferences UI, use the dynamic object within the localization prop.

Each key in dynamic should match a workflow ID, and its value should be the localized workflow name.

Localizing workflow names in preferences

import { Inbox } from '@novu/react';
 
function NovuInbox() {
  return (
      <Inbox
        applicationIdentifier="YOUR_APPLICATION_IDENTIFIER"
        subscriberId="YOUR_SUBSCRIBER_ID"
        localization={{
          dynamic: {
            // use the workflowId as a key to localize the workflow name
            'new-comment-on-post': 'Post comments',
            'new-follower-digest': 'New Follower Updates',
          }
        }}
      />
  )
}
export default NovuInbox;

On this page

Edit this page on GitHub