Djo FRS Posted yesterday at 08:24 AM Share Posted yesterday at 08:24 AM The issue occurs in: https://mysite.com/admin/index.php/configure/shop/seo-urls/ → Schema of URLs tab, when modifying the URLs. Example: EN version → Route to brand = brand/{id}-{rewrite} FR version → Route to brand = brand/{id}-{rewrite} But ideally it should we should be allowed to translate the term: EN → Route to brand = brand/{id}-{rewrite} FR → Route to brand = marque/{id}-{rewrite} The problem appears when using a "static" word in the route and the site is multilingual. Question: How can we adapt this static word depending on the language? Link to comment Share on other sites More sharing options...
El Patron Posted yesterday at 12:04 PM Share Posted yesterday at 12:04 PM maybe this will help: Keep the canonical route as brand/{id}-{rewrite}, and add language-specific aliases via web-server rewrites that point to the same controller. Example for Apache + language prefixes (/fr and /en): In Shop Parameters → Traffic & SEO, keep: Route to brand: brand/{id}-{rewrite} In your shop’s .htaccess (top, before the PrestaShop block, or inside the PS block but above other rules), add: # --- Language-specific alias for brand -> marque (FR) --- RewriteRule ^fr/marque/([0-9]+)-([^/]+)/?$ index.php?controller=manufacturer&id_manufacturer=$1 [QSA,L] # Optional EN alias (keeps both working) --- RewriteRule ^en/brand/([0-9]+)-([^/]+)/?$ index.php?controller=manufacturer&id_manufacturer=$1 [QSA,L] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now