vuestorefront/vue-storefront

[Bug]: Default locale does not work

samberrry opened this issue · 2 comments

Describe the Bug

Hi everybody,
When I set the defaultLocale in nuxt.config.js, it seems that it does not work, the result is always EN lang on the first request.

I'm using the latest version of vsf-core, nuxt packages, may be an issue within vsf-nuxt npm package. v2.7.5

Screen Shot 2023-04-26 at 4 27 00 AM

Current behavior

No response

Expected behavior

I must load website based on the defaultLocale config.

Steps to reproduce

No response

What version of Vue Storefront are you using?

any

What version of Node.js are you using?

any

What browser (and version) are you using?

any

What operating system (and version) are you using?

any

Relevant log output

No response

Able to fix / change the documentation?

  • Yes
  • No

Code of Conduct

  • I agree to follow this project's Code of Conduct

Hey @samberrry 👋

I think I found the issue, but I need @WojtekTheWebDev help over here.

const languagesOrderedByPriority = [

Looking at this code we are setting locales in order of priority and I think that defaultLocale has to be the top priority, since this is what user sets themselves.

@WojtekTheWebDev can you take a look at this issue, most probably I'm missing out something

hey @skirianov @WojtekTheWebDev ,
we still have this problem, is there any fix for it? i would be very thankful if you help us.
thanks