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

Pathname starting with locale forces locale #38

Open
amosbastian opened this issue Oct 3, 2024 · 1 comment
Open

Pathname starting with locale forces locale #38

amosbastian opened this issue Oct 3, 2024 · 1 comment
Labels
bug Something isn't working question Further information is requested

Comments

@amosbastian
Copy link

amosbastian commented Oct 3, 2024

So, for example if the path is /freedom and you have the locale fr, then it will switch to French even if your current locale is English for example.

Reproduction here: https://github.com/amosbastian/astro-i18n-example

CleanShot.2024-10-03.at.21.10.50.mp4

I confirmed it's caused by the pull request #34

@florian-lefebvre
Copy link
Member

Maybe we just need the check to be a bit less naive. Maybe it should check if it starts with /fr, but is followed by nothing or a slash

@florian-lefebvre florian-lefebvre added bug Something isn't working question Further information is requested labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants