Repository: next.js
Issue: [NEXT-979] i18n config breaks dynamic segments export with generateStaticParams (paths don't match)
Labels: Internationalization (i18n)

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

    Operating System:
      Platform: linux
      Arch: x64
      Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023
    Binaries:
      Node: 16.17.0
      npm: 8.15.0
      Yarn: 1.22.19
      pnpm: 7.1.0
    Relevant packages:
      next: 13.2.3
      eslint-config-next: 13.2.1
      react: 18.2.0
      react-dom: 18.2.0

### Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true), Internationalization (i18n)

### Link to the code that reproduces this issue

https://codesandbox.io/p/sandbox/next-13-2-i18n-static-params-error-3swobx

### To Reproduce

1. Create a page in `app/` directory with language routing and dynamic segment, e.g. `app/[lang]/blog/[slug]/page.tsx`
2. Add `generateStaticParams` with sample slugs and specifiec locale (e.g. `'en'`)
3. Add basic i18n config to `next.config.js`, defaultLocale and locales is enough. defaultLocale should have the same value as used in `generateStaticParams`
4. Run `next build` and observe error:

```
Error occurred prerendering page "/en/blog/test-1". Read more: https://nextjs.org/docs/messages/prerender-error
Error: The provided export path '/blog/test-1' doesn't match the '/[lang]/blog/[slug]/page' page.
Read more: https://nextjs.org/docs/messages/export-path-mismatch
    at /project/home/dmgawel/workspace/node_modules/next/dist/export/worker.js:99:27
    at Span.traceAsyncFn (/project/home/dmgawel/workspace/node_modules/next/dist/trace/trace.js:79:26)
    at Object.exportPage (/project/home/dmgawel/workspace/node_modules/next/dist/export/worker.js:43:27)
    at execFunction (/project/home/dmgawel/workspace/node_modules/next/dist/compiled/jest-worker/processChild.js:1:2828)
    at execHelper (/project/home/dmgawel/workspace/node_modules/next/dist/compiled/jest-worker/processChild.js:1:2486)
    at execMethod (/project/home/dmgawel/workspace/node_modules/next/dist/compiled/jest-worker/processChild.js:1:2574)
    at process.messageListener (/project/home/dmgawel/workspace/node_modules/next/dist/compiled/jest-worker/processChild.js:1:1284)
    at process.emit (node:events:513:28)
    at emit (node:internal/child_process:939:14)
    at processTicksAndRejections (node:internal/process/task_queues:84:21)
```

### Describe the Bug

Having locales and defaultLocale specified in config file breaks `generateStaticParams` functionality when running production build. It seems like the default locale is stripped from page path, causing the export path not match the pattern.

### Expected Behavior

Build should run smoothly (without removing i18n config from config file, wchich may be needed for `pages/` directory), all `app/` pages with `generateStaticParams` should be prerendered. 

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_

<sub>[NEXT-979](https://linear.app/vercel/issue/NEXT-979/i18n-config-breaks-dynamic-segments-export-with-generatestaticparams)</sub>