Home > widget-integration > CartController > buildUrlWithLocalization
CartController.buildUrlWithLocalization() method
Build URL with localization prefix Protected method - override to customize URL building for specific shops
Signature:
protected buildUrlWithLocalization(path: string): string;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
path |
string |
Path without locale prefix (e.g., 'cart', 'products/123') |
Returns:
string
Full URL with locale prefix if applicable
Example
// For English shop: buildUrlWithLocalization('cart') => '/cart'
// For French shop: buildUrlWithLocalization('cart') => '/fr/cart'