Skip to content

Wishlist Dictionary

The Wishlist dictionary contains all user-facing text, labels, and messages displayed by this drop-in. By customizing the dictionary, you can:

  • Localize the drop-in for different languages and regions
  • Customize labels and messages to match your brand voice
  • Override default text without modifying the drop-in’s source code

Dictionaries use the i18n (internationalization) pattern, where each text string is identified by a unique key path.

Version: 2.0.1

Default keys and values

Below are the default English (en_US) strings provided by the Wishlist drop-in (34 keys):

{
"Wishlist": {
"EmptyWishlist": {
"heading": "Your wishlist is empty",
"message": "Add items by clicking on the heart icon.",
"cta": "Start shopping"
},
"Wishlist": {
"heading": "Wishlist {count}",
"loading": "Loading...",
"ariaLabelAddToWishlist": "add {PRODUCT_NAME} to wishlist",
"ariaLabelRemoveFromWishlist": "remove {PRODUCT_NAME} from wishlist"
},
"Alert": {
"addProduct": {
"heading": "Added to wishlist",
"message": "{product} has been added to your wishlist"
},
"removeProduct": {
"heading": "Removed from wishlist",
"message": "{product} has been removed from your wishlist"
},
"moveToCart": {
"heading": "Moved to cart",
"message": "{product} has been moved to your cart"
},
"addError": {
"heading": "Error",
"message": "Failed to add product to wishlist"
},
"removeError": {
"heading": "Error",
"message": "Failed to remove {product} from wishlist"
},
"viewWishlist": "View wishlist"
},
"Login": {
"sync": " to sync your saved items across all your devices.",
"logIn": "Log in"
}
},
"ProductItem": {
"CartActionButton": "Move To Cart",
"TrashActionButton": "Remove this product from wishlist",
"CustomizeActionButton": "Customize"
}
}

How to customize

You can override any of these dictionary values by creating a custom dictionary file and loading it during drop-in initialization. The drop-in will automatically deep-merge your custom values with these defaults.

For complete step-by-step instructions, see the Dictionary customization guide.

Quick example:

import { initialize } from '@dropins/storefront-wishlist';
await initialize({
langDefinitions: {
en_US: {
"Wishlist": {
"EmptyWishlist": {
"heading": "Custom string",
"message": "Custom string"
}
}
}
}
});