Locale Aware URLs in Product Descriptions

I’ve recently updated a theme for a client using Markets to change all URLs to locale aware ones instead of hardcoded ones.

However I can’t find a way to do this with links within areas like Product Description text, has anyone come up with a solution there?

I had thought about using JS to check through anchor tags in the description html and add the locale code if needed, but seems a bit of a hacky solution.

Hey @StephenK !

Not sure if you’re still looking for an answer here, but incase anyone else comes across this post, you can just use relative links in the product description.

As an example, instead of "https://store.com/products/name", use “/products/name”. Shopify will automatically convert them to the correct market.

Not including the “market code” (ie en-GB) in the url causes the user to be bounced back to the default detected market. Which if someone is overseas (say in fr-FR), but has manually changed the market to their home one (en-GB) and clicks a URL without the code in, it will default back to (fr-FR).

@StephenK Did you ever find a fix for this? I’m having the same issue. Even when I just have this as the href “/products/name”, it still takes the person back to the root URL, instead of the market they are in (where the root could be “/en-ca/products/name”)

No, and I no longer deal with Shopify store development on a day to day basis.