Internationalized Routing Next.JS

Am i right in thinking using auth0/nextjs-auth0 library, there is no way for me to dynamically set the locale.

Looking at the docs it states you need to set the provider

<UserProvider loginUrl="/foo/api/auth/login" profileUrl="/foo/api/auth/me">
      <Component {...pageProps} />
    </UserProvider>

any links

<a href="/foo/api/auth/login">Login</a><br />
<a href="/foo/api/auth/logout">Logout</a>

which I could probably set from the router.locale, but the it goes on to say:

You should configure baseUrl (or the AUTH0_BASE_URL environment variable)

Which i think restricts me to one locale?

Am i correct in thinking this?

It looks as if the react version you can just set through the handler, am i missing something?

Many thanks for any help.

1 Like