2

I'm wondering how other developers handle multilingual stores in Magento2. I find it rather hard, because you'll want to optimize the URL keys for SEO in each language, but in doing so you lose the relation between pages. That is why the Magento documentation tells us to use the same canonical URL key for all translations.

For instance, English /about-us/ would translate to /over-ons/ in Dutch. But when I open that page in any language and switch to another, I get a 404 page because it looks for the same URL key.

The same issue arises with menus. A lot of shops have static items/pages in their menus which each have their own URL key and label/name.

So what would you suggest is the best way to make this manageable?

My first thought would be to have a .htaccess file with rewrites, rewriting about-us to over-ons and back, but that would make it unmanageable with more languages and a lot of content.

4

2 Answers 2

1

Why not just make a different CMS page for each language? Seems to me the Dutch page should have other content anyway. Just make a CMS page "About us" with url-key about-us on your English site, and another CMS page "Over ons" with url-key over-ons on your Dutch site.

2
  • 1
    Because when you switch from another language, you'd get a 404 page. Also, this creates the problem of having multiple instances of the same menu (a seperate menu per language). This is doable, but far from ideal, and I was hoping there would be a better solution
    – Asitis
    Nov 29, 2016 at 15:21
  • Which get's me thinking, a possible solution would be to add a custom attribute with (another) identifier which would be the same for all different languages of the same page, and use that identifier to get the current correct URL (and maybe redirect if coming from another).
    – Asitis
    Nov 29, 2016 at 15:22
0
  1. Assign the preferred localized URL key to each CMS page, e.g.:
    • EN: about-us to cms/page/view/page_id/1 titled About us
    • NL: over-ons to cms/page/view/page_id/2 titled Over ons
    • DE: ueber-uns to cms/page/view/page_id/3 titled Über uns
  2. Create custom permanent redirects (Marketing -> URL Rewrites) for the keys foreign to the Store View:
    • EN: over-ons to about-us and ueber-uns to about-us
    • NL: about-us to over-ons and ueber-uns to over-ons
    • DE: over-ons to ueber-uns and about-us to ueber-uns

These localized slugs are hard to maintain for a growing number of Store Views or static CMS pages, but may be worth the effort for UX and SEO.

PS: There are apparently some seemingly unmaintained extensions on GitHub for Magento 1 which try to simplify this maintenance task:

Your Answer

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

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