Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Default language not respected when accessing site without language-specific endpoint #1996

Open
1 task done
xhypeDE opened this issue May 23, 2023 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@xhypeDE
Copy link

xhypeDE commented May 23, 2023

What happened?

The default language setting of my Shopware PWA site is not being respected when accessing the site without a language-specific endpoint in the URL. Even though English is set as the default language in my configuration, the site defaults to displaying content in German when accessed at the root domain (without the /en/ endpoint).

Steps To Reproduce

  • Configure a Shopware PWA site to support both English and German languages.
  • Set English as the default language in the configuration.
  • Access the English version of the site at https://pwa.newjoy.devla.dev/en/. The content is correctly displayed in English.
  • Use the language switcher component on the site to switch to English. The site correctly redirects to the /en/ endpoint and displays the content in English.
  • Access the site without the /en/ endpoint, i.e., at https://pwa.newjoy.devla.dev/. Despite English being the default language, the site displays content in German.

Additional notes:

Given the behavior, the potential causes might be:

  • Shopware may be using German as the fallback language.
  • The default sales channel might be set to German.
  • Shopware's URL routing might be defaulting to German when no language is specified in the URL.
  • The site might be defaulting to the language specified in the browser settings (though this is unlikely as the issue persists across different browsers and devices).

Is there an existing issue for this?

  • I have searched the existing issues

Version

Contribution (cloned/forked from GH)

Which element is affected?

shopware-6-client

Environment

- OS: Ubuntu 20.04.2 LTS
- Node: 16.13.0
- Shopware API: v6.4.7.0 Stable Version
- Shopware PWA version: 1.0.2

Relevant log output

There is no specific error log output related to this issue. The site functions as expected, but the default language is not respected when no language-specific endpoint is provided in the URL.
@xhypeDE xhypeDE added the bug Something isn't working label May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant