Does Shopware Frontends (Vue) have multi-language support? Does its `LanguageSwitcher` currently work? How do we use it?

In the PHP based frontend language selection/switching works (e.g. here: https://demo-frontends.shopware.store).

In the Vue based frontend (vue-demo-store), language selection/switching does not seem to work. How to reproduce:

  • :white_check_mark: Clone the Frontends Repository, install it and run pnpm run dev --filter=vue-demo-store as described in the README.md. Visit „localhost:3000“ in the browser.
  • :white_check_mark: There is a language switcher in the footer: a select box with the options „English“, „Polish“ and „German“, as expected.
  • :x: If you change the selected language, nothing happens.
  • :x: If you enter one of these URLs in the browser address bar and hit „Enter“, you get the 404 error page („We can’t find what you are looking for. Are you lost?“):
    • localhost:3000/de-De/Summer-trends-DE/
    • localhost:3000/Summer-trends-DE/
    • localhost:3000/de-De/
    • localhost:3000/de
  • All SEO URLs I could retrieve through demo-frontends.shopware.store/store-api/seo-url had the same languageId (don’t know if this is relevant).

My question: What would one have to do to get a language switcher that actually switches the language?

Thank you for your help.

In the demo, it works fine. The products and texts are just not translated to German, e.g., Elli - Ice cream machine

Thank you very much for checking that! If I am not mistaken, the content at the link you posted is rendered by PHP/Twig/… and not by Vue/Nuxt/… There everything works flawlessly.

I am talking about this: „frontends/templates/vue-demo-store at main · shopware/frontends · GitHub“. Many things work well there as well.

I have tried it again:

  • :white_check_mark: I can now switch between English and Polish (I don’t know what happened earlier… might be a mistake on my part).
  • :x: German still does not work for me ([localhost:3000] /de-De → 404). Do you currently see the same behavior?
  • :x: Variant selection currently does not work in Polish (for me, e.g. at [localhost:3000] /pl-PL/Curry-Madras-indyjskie-sezonowane/SW10100 , observe the change in the URL in the browser address bar)
  • :x: The html lang="..." attribute does not reflect the selected language.
  • :x: The „Landing page“ link in the footer does not work in Polish.
  • :x: The sorting dropdown appears empty on [localhost:3000] /pl-PL/Cooking-pleasure-Provence/Eat/
  • :ok: Switching the language using the language switcher always leads the user to the home page in the target language (works but is not as nice as the PHP based frontend).

Where I was stuck initially: We had based the sales channel configuration on the tutorial at „Shopware 6 - Tutorials - Setting up the Store for a bilinguale country“. There only the language code is appended to the URL, not the country code (e.g. ".../fr" not ".../fr-CH"). The Shopware Frontends Vue Demo Store seems to be set up under a different assumption. Once I realized that this (inconsistent Frontend / Sales Channel configuration) was the main problem, it could easily be dealt with.

In our project, I had to fix/„fix“ the things mentioned above as well. This is done now. I might not have a problem anymore. Do you know of other localization pitfalls?

Activating multi-language support has taken me longer than I expected. Do you believe, the Shopware Frontends team would appreciate an issue / feature request on the Github issue tracker?