#Need help with i18next package config in my project

12 messages · Page 1 of 1 (latest)

steel jacinth
#

So my application has a OAuth service and the callback uri is limited to /auth?code=23..... but when am using the package i cannot redirect as the routes are all either /fr/auth or /en/auth depending the preference. How can i solve this issue.

austere acornBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

visual otter
steel jacinth
#

import createMiddleware from 'next-intl/middleware';
import { routing } from './i18n/routing';

export default createMiddleware(routing, {
localeDetection: false
});

export const config = {
// Match only internationalized pathnames
matcher: ['/', '/(fr|en)/:path*']
};

i have basic middleware like this one

visual otter
steel jacinth
#

yea its supposed to as am passing the routing

import { defineRouting } from 'next-intl/routing';
import { createSharedPathnamesNavigation } from 'next-intl/navigation';

export const routing = defineRouting({
// A list of all locales that are supported
locales: ['en', 'fr'],

// Used when no locale matches
defaultLocale: 'en',
localePrefix: 'never'

});

// Lightweight wrappers around Next.js' navigation APIs
// that will consider the routing configuration
export const { Link, redirect, usePathname, useRouter } =
createSharedPathnamesNavigation(routing);

visual otter
steel jacinth
#

yes

visual otter
# steel jacinth yes

can you clarify this then:

i cannot redirect as the routes are all either /fr/auth or /en/auth

steel jacinth
#

am so sorry am really new to this job and dont have much experiance

visual otter