4
votes

I was comfortable handling multilanguage setups using store views, setting each store view's code to it's respective language shortcode (de, fr, en, ...). Then enabled "Add Store Code to URLS" and everyone was happy, it just worked.

This time it's somewhat more complicated. I have a Magento installation with multiple websites, one for each contry, and some of them have common language codes.

For example, imagine that I have a website for both Canada and Belgium. The first one will support French and English as navigation languages and the latter one French, Dutch and German.

Since both sites have common navigation languages (French), I cannot use the language shortcode as the store view code, as these ones must be unique. I could prefix the website name to the store view code site1_fr, site2_fr, but as the store code is meant to be shown on the url, this will lead to ugly and somewhat redundant urls: site1.ca/site1_fr instead of just site1.ca/fr.

Is there some kind of workaround in order to hide these ugly store codes?

Perhaps some mod_rewrite magic and Magento config changes would do the trick?

Thanks in advance.

3
OF course there are workarounds to do anything, but you haven't said what you want. If you want to redirect e.g. /somestore/ to /site1_fr/, then why not just use the code "somestore" in the first place? Tell us what you want TO happen, not just what you want to NOT happen.Benubird

3 Answers

1
votes

Here is solution for make stores with same language codes , like shirts.com/en and shoes.com/en - https://gist.github.com/arosenhagen/5256617

0
votes

I want to second the idea of using a different domain or subdomain for the different language store views. Otherwise you will have pages with the same url but different content; probably not optimal for your sites SEO, or be forced to use the 'add store code to urls' config which has never seemed to work completely right in my experience.