6

I am getting stuck with an issue, I have a Multilanguage site that is based on SXA. Rather than going to change via language drop-down, I am going to change language via URL.

Please see the steps below what I made for reproducing this issue:

  1. first of all I have two language site which is en-ca and fr-Ca. en-ca is the default one.
  2. I have a product page that exists in both languages.
  3. When I try to hit the URL like: https://domainname/en-ca/product for en-ca result will be correct. Now rather than changing the item language from the language selector dropdown, I tried to change the URL from the above to like: https://domainname/fr-ca/product. After hitting the same page will load and get data from fr-ca language.
  4. But it goes to the 404 page because no one product name like this exists in a tree for fr-ca because I have changed the name of the product in fr-ca is products.

So my concern is that rather than resolving an item via its item name, I want to resolve it via display name.

Anyone, please suggest to me the better way how I can handle this?

1

1 Answer 1

0

You can use simillar kind of approach and tweek it. For creating friendly names for products, you can follow this documentation.

2
  • The link can be expired, instead, add your detailed answer here rather than providing the link, you can also provide a link along with your detailed answer. Aug 23, 2022 at 10:13
  • Currently while this does provide an answer to the question, it is a link only answer. When someone goes on Stack Exchange, the question "answer" should actually contain an answer. Not just a bunch of directions towards the answer. Please see this meta post for details on how to update your answer to be Stack Exchange friendly, thanks: meta.stackexchange.com/questions/8231/…
    – Marek Musielak
    Sep 22, 2022 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.