Wishlist Dictionary
The Wishlist dictionary contains all user-facing text, labels, and messages displayed by this drop-in. Customize the dictionary to:
- Localize the drop-in for different languages and regions
- Customize labels and messages to match your brand voice
- Override default text without modifying source code for the drop-in
Dictionaries use the i18n (internationalization) pattern, where each text string is identified by a unique key path.
Version: 3.0.0-beta1
How to customize
Override dictionary values during drop-in initialization. The drop-in deep-merges your custom values with the defaults.
import { initialize } from '@dropins/storefront-wishlist';
await initialize({ langDefinitions: { en_US: { "Wishlist": { "EmptyWishlist": { "heading": "My Custom Title", "message": "Your custom message here" } } } }});You only need to include the keys you want to change. For multi-language support and advanced patterns, see the Dictionary customization guide.
Default keys and values
Below are the default English (en_US) strings provided by the Wishlist drop-in:
{ "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" }}