nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.71k stars 478 forks source link

fix: overwrite or unset unknown cookie locale #2841

Closed BobbieGoede closed 6 months ago

BobbieGoede commented 6 months ago

πŸ”— Linked issue

❓ Type of change

πŸ“š Description

Resolves #2822

This changes the cookie behavior, if the cookie locale is set to something truthy but does not match a locale it will be overwritten to the configured defaultLocale or undefined if no default has been set.

The only real use case I can imagine is when websites remove locales or when they update a locale code, this would lead to unexpected behaviour.

πŸ“ Checklist