Several Magento sites with store view codes in the form of language codes

It was convenient for me to manage multilingual settings using store views, setting each store viewing code to the corresponding short language code (de, fr, en, ...). Then he turned on β€œAdd store code in URLS”, and everyone was happy, it just worked.

This time it's a little harder. I have a Magento installation with several websites, one for each tournament, and some of them have common language codes.

For example, imagine that I have a site for Canada and Belgium. The first of them will support French and English as navigation languages, and the second - French, Dutch and German.

Since both sites have common navigation languages ​​(French), I can not use the short language code as the code for representing the repository, since these must be unique. I could prefix the website name in the form of the store1 site code site1_fr, site2_fr, but since the store code is intended to be displayed on the URL, this will lead to ugly and somewhat redundant URLs: site1.ca/site1_fr, and not just site1. ca / fr.

Is there any workaround to hide these ugly store codes?

Perhaps some mod_rewrite modifications and Magento configuration changes might do the trick?

Thanks in advance.

+4
source share
3 answers

Here is a solution for stores with the same language codes as shirts.com/en and shoes.com/en - https://gist.github.com/arosenhagen/5256617

+1
source

I want to repeat the idea of ​​using a different domain or subdomain for different types of language repository. Otherwise, you will have pages with the same URL, but with different content; probably not optimal for your SEO sites, or be forced to use the "add store code in URL" configuration, which never worked completely in my experience.

0
source

All Articles