Commerce localization tasks
After translating your storefront content (Universal Editor or Document Authoring), complete these Commerce-specific tasks.
Commerce-specific localization tasks
Translate drop-in placeholder files
Drop-in components use placeholder JSON files to store UI labels and text. These files must be translated for each locale.
- Locate the
placeholdersfolder for each locale:- Source:
/en/placeholders/ - Target:
/fr/placeholders/(or your target locale)
- Source:
- Translate the placeholder JSON files for each drop-in:
cart.json- Shopping cart labels and messagescheckout.json- Checkout flow textpdp.json- Product detail page labels- Other drop-in-specific placeholder files
- Include these files in your translation workflow or translate them manually.
- Verify that the JSON syntax remains valid after translation.
Align with the multistore configuration
Ensure that your translated content aligns with the multistore folder structure and store view configuration.
- Review your multistore setup to confirm:
- Store view codes in Adobe Commerce Admin
- Folder structure on Edge Delivery Services (for example,
/en/,/fr/,/fr-ca/,/en-ca/) - Store view headers in
config.json
- Verify that translated content exists in the correct locale folders.
- Confirm store view headers are configured:
- Each locale should have the correct
Magento-Store-View-Codeheader - Headers must match the store view codes in Adobe Commerce Admin
- Each locale should have the correct
Verify Commerce functionality
After publishing translated content, verify that all Commerce integration points work correctly.
- Navigate to your storefront in each locale (for example,
https://yoursite.com/fr/). - Verify drop-in components display translated text:
- Shopping cart labels
- Checkout flow text
- Product detail page labels
- Account/login interfaces
- Test Commerce data integration:
- Products display in the correct language
- Prices show the correct currency for the locale
- Product descriptions match the store view language
- Verify store view functionality:
- Store switcher displays available locales
- Switching stores navigates to the correct URL
- Each store view shows appropriate content
- Test the complete customer journey:
- Browse products in the translated locale
- Add items to cart and verify cart labels
- Proceed through checkout and verify all text
- Check confirmation emails use the correct language
Link localization
The boilerplate automatically localizes internal links to match the current locale. This ensures that users stay within their chosen language and region as they navigate the site.
Automatic link localization
The decorateLinks() function (enabled by default in the boilerplate) automatically prepends the locale path to all internal links. For example:
- On
/en-ca/pages:/products/becomes/en-ca/products/ - On
/fr/pages:/products/becomes/fr/products/
Preventing link localization
For links that should always point to a specific locale (like store switcher links), add #nolocal to the URL:
[Switch to US Store](https://yoursite.com/en/#nolocal)This prevents automatic localization, keeping the link at /en/ regardless of locale.
See also: Localizing links for developer implementation details.
Best practices for Commerce localization
- Placeholder files: Translate placeholder JSON files before launching each locale. Untranslated labels confuse customers.
- Store view testing: Test the complete customer journey (browse → cart → checkout) in each locale.
- Path alignment: Align content paths with multistore configuration for each locale.
- Product configuration: Configure products, categories, and CMS content for each store view in Adobe Commerce Admin.
- Translation quality: Use human translation for checkout, cart messages, and error messages.
- Currency and pricing: Verify currency symbols, decimal separators, and price formatting for each locale.
- Link localization: Add
#nolocalto store switcher and cross-locale links.
Troubleshooting Commerce-specific issues
Product data appears in wrong language
Symptoms: Products display English descriptions on the French storefront, or prices show wrong currency.
Solutions:
- Verify the
Magento-Store-View-Codeheader in yourconfig.jsonfor the locale path - Ensure the store view code matches the one configured in Adobe Commerce Admin
- Check that products are configured for the target store view in Commerce Admin
- Clear the browser cache and test in an incognito window
Drop-in labels not translated
Symptoms: Cart, checkout, or product detail page labels appear in English instead of the target language.
Solutions:
- Verify placeholder JSON files (
cart.json,checkout.json,pdp.json) exist in the locale’splaceholdersfolder - Check that JSON files contain translated values (not just copied from English)
- Ensure JSON syntax is valid (no syntax errors from translation process)
- Republish the placeholder files to Edge Delivery Services
- Check browser console for errors loading placeholder files
Store view path issues
Symptoms: /fr/ URLs show English content, or French content appears at wrong paths.
Solutions:
- Verify that locale folders match your multistore setup folder structure
- Check that store view headers in
config.jsonmatch the locale paths - Example:
/fr/folder should have"Magento-Store-View-Code": "fr"in its config - Clear CDN cache and test in an incognito window
Currency or pricing display issues
Symptoms: Wrong currency symbols, incorrect decimal separators, or unexpected price formatting.
Solutions:
- Verify the store view is configured with the correct currency in Adobe Commerce Admin
- Check that the
Magento-Store-View-Codeheader is correctly set for the locale - Ensure product prices are configured for the target store view
- Test in different browsers to rule out browser-specific formatting issues
Additional resources
Adobe Commerce configuration
- Store view configuration - Adobe Experience League
- Adobe Commerce Configuration Scope - Adobe Experience League
- Websites, Stores, and Views - Adobe Experience League
Edge Delivery Services
- Edge Delivery Services Documentation - aem.live
- Translation and Localization - aem.live