Skip to content

Bug in remove-default-locale Branch - Locale Switching Issue #5

Description

@Villalobos4113

Bug in remove-default-locale Branch - Locale Switching Issue

Environment:

  • Branch: remove-default-locale
  • Browser's Default Locale: en
  • Project's Default Locale: de

Description:
There appears to be a bug affecting locale switching functionality. When the browser's default locale is set to English ('en') and the project's default locale is set to German ('de'), the following issue occurs:

Steps to Reproduce:

  1. Open the application with the browser's default locale set to 'en'.
  2. The first render redirects to '/en' (expected behavior).
  3. Attempt to switch to the German locale ('de') using the provided button.

Expected Behavior:
Upon clicking the switch button, the application should redirect to the '/de' route.

Actual Behavior:
The button does not work as intended. The redirectedPathName becomes '/' and the middleware interprets this as if no locale is found, resulting in a redirect back to the user's default locale ('en'). Consequently, switching to '/de' via the button is not possible.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions