Skip to content

[Bug] - Locales are not being preserved for translation currently #1076

@jupiter007

Description

@jupiter007
  • Go to /account/profile and change your language to Portuguese.
  • Then navigate away from the page.
  • Notice that the "locale" in the URL goes back to "en-US"

This is because all calls to routePath in the pages need to include the locale, otherwise the routePath function just inserts the default en-US.

We can do this by use importing {useLocale} from 'next-intl' in our components, and initiating it with const currentLocale = useLocale() and pass in the currentLocale to the routePath

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions