Skip to content

[✨]Non-Routable URL Route Param #271

@mhevery

Description

@mhevery

Is your feature request related to a problem?

  1. Imagine I have my application which has a set of routes: ['/', '/[item]']
  2. Now, I would like to internationalize the application. The way I would like to do this is to add /[lang]/ as a prefix to my routes. So the new routes are really ['/[lang]/', '/[lang]/[item]'].

How can I achieve the above today?
There are couple of issues we run into:

  1. there is no easy way to create route prefixes
  2. Within the application the best practice is to have absolute URLs. This creates an issue since the URL now contains a prefix.

Describe the solution you'd like

When creating an application, I would like to:

  1. Specify a prefix param that should be outside of my application routes.
  2. Have URL building take the prefix into account.

Describe alternatives you've considered

explicitly add /[lang] into the application route.

Issues:

  • When building routes it may be hard to know the current lang
  • navigation across lang should never be SPA (always MPA). Really navigation across lang is a different website.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions