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

fix(vue-demo-store): extract lang code from accept-language header #307

Merged
merged 8 commits into from
Jul 13, 2023

Conversation

mkucmus
Copy link
Collaborator

@mkucmus mkucmus commented Jul 10, 2023

Description

Browser can have a setting with multilanguages allowed as an accept-language header "de,en-US;q=0.7,en;q=0.3";
the order sticks to the priority.
thanks to this we can find the first matching language code from the string, and then, the language code can be used by

new Intl.NumberFormat('de', {
      style: "currency",
      currency: 'EUR',
    }).format(123)
'123,00 €'

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Screenshots (if applicable)

Additional context

@vercel
Copy link

vercel bot commented Jul 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frontends-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 7:52am
shopware-frontends-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 7:52am

@mkucmus mkucmus marked this pull request as draft July 10, 2023 07:31
Copy link
Collaborator

@BrocksiNet BrocksiNet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 👍

At the moment also when you link from Twitter to the demo page the page is broken. With that fix, it was working as expected. We should merge this fast.

@patzick patzick merged commit b3d391b into main Jul 13, 2023
@patzick patzick deleted the fix/use-price-locale-in-ssr branch July 13, 2023 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants