<h1 dir="auto">Feature request</h1>
<h2 dir="auto">Is your feature request related to a problem? Please describe.</h2>
<p dir="auto">url structures are still visible on devices, so its a UI-element and often is bound to editorial decisions, yet in nextjs, url routes always reflect the filesystem of the project</p>
<p dir="auto">Having the filename of a page be the route path segment might be ok, if you develop for an english target group, but leads to problems in other markets. E.g. in switzerland we often need to have an app in multiple languages and customers often wish that the url paths are also translated.</p>
<p dir="auto">Also, there is a common practice, that source code is always in english. So this leads to the problem, that when you decide to have e.g. german url paths, you need to have german-named files in your app, which just feels wrong.</p>
<p dir="auto">Nextjs should therefore provide a firstclass support to translate url path segments.</p>
<h2 dir="auto">Describe the solution you'd like</h2>
<p dir="auto">There should be a way to provide aliases to pages in code. So a page would be delivered on all available aliases. It should be possible to use translation services to provide these aliases. They should work both on server and on client.</p>
<p dir="auto">If you use a <code class="notranslate">&lt;Link /&gt;</code>�  to a page, you can provide some context, so that nextjs would use the right alias to make the route. E.g. you could provide the locale.</p>
<p dir="auto">I don't know nextjs good enough to suggest an api for it yet, but suggestions are very welcome!</p>
<h2 dir="auto">Describe alternatives you've considered</h2>
<p dir="auto">Doing it with dynamic routes (next 9 feature), is nearly impossible, because every page and folder would basically look like <code class="notranslate">[slug].js</code>, so you would need to deliver the right page yourself, defeating the purpose of the whole file-system-routing.</p>
<p dir="auto">It's only possible with a custom server and some boilerplate, so that your <code class="notranslate">&lt;Link /&gt;</code> behave correctly. But this is needs careful setup, so that you don't have duplicated route declarations and it is therefore error-prone.</p>
<h2 dir="auto">Problem</h2>
<p dir="auto">I created a project via create-<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-app">next-app</a>, but when I tried to run dev server I got an error below:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ error ] ./node_modules/next/dist/client/dev/amp-dev.js
Error: [BABEL] C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\client\dev\amp-dev.js: Cannot find module './src/data'
Require stack:
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\core-js-compat\helpers.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\core-js-compat\get-modules-list-for-target-version.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\@babel\preset-env\lib\polyfills\corejs3\usage-plugin.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\@babel\preset-env\lib\index.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\build\babel\preset.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\build\webpack\loaders\next-babel-loader.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\loader-runner\lib\loadLoader.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\loader-runner\lib\LoaderRunner.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\webpack\lib\NormalModule.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\webpack\lib\NormalModuleFactory.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\webpack\lib\Compiler.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\webpack\lib\webpack.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\server\hot-reloader.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\server\next-dev-server.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\server\next.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\server\lib\start-server.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\cli\next-dev.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\bin\next (While processing: &quot;programmatic item&quot;)"><pre class="notranslate"><code class="notranslate">[ error ] ./node_modules/next/dist/client/dev/amp-dev.js
Error: [BABEL] C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\client\dev\amp-dev.js: Cannot find module './src/data'
Require stack:
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\core-js-compat\helpers.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\core-js-compat\get-modules-list-for-target-version.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\@babel\preset-env\lib\polyfills\corejs3\usage-plugin.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\@babel\preset-env\lib\index.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\build\babel\preset.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\build\webpack\loaders\next-babel-loader.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\loader-runner\lib\loadLoader.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\loader-runner\lib\LoaderRunner.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\webpack\lib\NormalModule.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\webpack\lib\NormalModuleFactory.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\webpack\lib\Compiler.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\webpack\lib\webpack.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\server\hot-reloader.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\server\next-dev-server.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\server\next.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\server\lib\start-server.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\cli\next-dev.js
- C:\Users\serge\Coding\web\playground\nextjs-tests\bitzprice\node_modules\next\dist\bin\next (While processing: "programmatic item")
</code></pre></div>
<p dir="auto">Packages information:</p>
<ul dir="auto">
<li>next: 9.1.4,</li>
<li>react: 16.12.0</li>
<li>react-dom: 16.12.0</li>
</ul>
<p dir="auto">My dependency manager is Yarn (1.19.2)</p>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Working dev server</p>
<h2 dir="auto">System Information</h2>
<ul dir="auto">
<li>OS: Windows 10 (1903)</li>
</ul>