Skip to content

Routing to default Locale if trying to use an unsupported locale #680

Answered by gablabelle
gablabelle asked this question in Q&A
Discussion options

You must be logged in to vote

@aralroca This worked, thanks.

       async redirects() {
          return [
            // Unsupported language that we could be received in URL via
            // 3rd party integrations (i.e Microsoft Teams)
            // that we can't map to our app locales.
            {
              source: '/(..|..-.[^/]+)/:path*', // Could be the following formats: ru kk-kz es-419 ca-es-VALENCIA
              destination: '/:path*',
              permanent: false,
            },
          ];
        }

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by gablabelle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants