We are trying to mimic support for Fallback languages in Commerce. For now we are able to take the entry content with fallback support, but we are having an issue with the URLs. For example,
My question is: is there a way to allow /en-gb/ URLs for commerce (even if no version is published in that language) and handle the loading of the content myself?
I've been in the same situation as you. Unfortunately, Fallback and Replacement Languages are deactivated in Commerce. It means that your experience is by design and requires you to add some customized code in order to easen the way of working with Language Branches and Catalog Content.
I spent some time on investigating the opputunities of changing this and ended up with an implementation that pre-fills the Properties when your Editors in Commerce changes between un-published Language Branches. Basically, they can activate/publish the en-GB product simply by clicking Publish wihtout having to copy paste all the characteristics. It has even been described in a fresh Blog Post, that I published 5 minutes ago. :-)
I hope it helps you getting closer to your need. I am convinced that you can ensure that your Language Branches (e.g. en-GB) are automatically published by adjusting the implementation of my ICatalogContentBuilder examples.
Have a good day.
Casper Aagaard Rasmussen
Thank you very much for your answer. We continued our investigation and tried to see if we can leverage a custom implementation of HierarchicalCatalogPartialRouter but with no luck. It still gives us 404 when accessing the product link in an unpublished language. So the ultimate solution for us was to publish all the products in all languages. This was easy for us, as we import them daily, but we have 20 languages supported and we would've preferred to not duplicate the data and keep the db cleaner by creating a fallback mechanism.
Thank you for your input and help.
Happy that you found a solution that works. Approach is quite similar to mine - biggest difference is that you are automating how Content is "replicated" via your import where I, on the other hand, allows Editors in Commerce to do it via the authoring workflow.
Regarding the PartialRouter approach. I originally tried the same, but ended up skipping it due to obvious issues. Your XML Sitemaps and Search features would be compromised because content is, on en-GB, inaccessible via Episerver Find and ContentRepository.
Casper Aagaard Rasmussen