Skip to main content
LaunchIt per default routes the different languages using the language code as a prefix in the URL. /en is the default language. The other languages are prefixed with their language code (e.g. /de for German).

Using a single language without prefix

If you don’t want to use multiple languages, follow these steps.
  1. Go to the .env file and set the NEXT_PUBLIC_ENABLE_LANG_ROUTING to 0.
  2. Replace the default matcher with the following code:
web/middleware.ts
  1. After that, move the contents of the web/[locale] folder to the app folder. Override every existing file. Delete the empty /[locale] folder.
  2. Customize your canonicals on your public pages.

Using multiple languages without prefix

If you want to use multiple languages without a prefix, follow these steps.
  1. Go to the .env file and set the NEXT_PUBLIC_ENABLE_LANG_ROUTING to 1.
  2. Replace the default matcher for the web/middleware.ts with the code you’ll find in the example above. Also replace the the return condition like so:
web/middleware.ts
  1. Move the contents of the web/[locale] folder to the app folder. Override every existing file. Delete the empty /[locale] folder.
  2. Change your request file like so:
web/i18n/request.ts
  1. Customize your canonicals on your public pages.
For more information, head over to the next-intl documentation.
This is a custom implementation and not part of the default LaunchIt setup. You should read the docs to fully implement this feature.