next.js/packages/next/src/client/normalize-locale-path.ts
normalize-locale-path.ts11 lines435 B
import type { normalizeLocalePath as Fn } from '../shared/lib/i18n/normalize-locale-path'

export const normalizeLocalePath: typeof Fn = (pathname, locales) => {
  if (process.env.__NEXT_I18N_SUPPORT) {
    return (
      require('../shared/lib/i18n/normalize-locale-path') as typeof import('../shared/lib/i18n/normalize-locale-path')
    ).normalizeLocalePath(pathname, locales)
  }
  return { pathname, detectedLocale: undefined }
}
Quest for Codev2.0.0
/
SIGN IN