Recommendations Dictionary
The Recommendations 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: 1.1.1
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-recommendations';
await initialize({ langDefinitions: { en_US: { "Recommendations": { "ProductList": { "addToCart": "Custom value", "selectOptions": "Custom value" } } } }});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 Recommendations drop-in:
{ "Recommendations": { "ProductList": { "addToCart": "Add To Cart", "selectOptions": "Select Options", "viewProduct": "View Product" } }}