Skip to content

Added localized routing - #54

Merged
spietras merged 1 commit into
mainfrom
routing
Nov 27, 2026
Merged

spietras merged 1 commit into
mainfrom
routing

Conversation

@spietras

@spietras spietras commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Added prefix-free localized routing, with public paths for every route translated by Lingui from a central route table
  • Added a proxy that serves public paths of the current locale from their internal routes and redirects internal paths and public paths of other locales to them
  • Added LocalizedLink, useLocalizedRouter, useDelocalizedPathname, useLocalizedRedirect, useLocalizedPermanentRedirect, localizedRedirect and localizedPermanentRedirect, which translate internal paths at the edges
  • Added RoutingProvider, which passes translated routes of all locales from the server and keeps the address bar in the current locale
  • Added getLocale, which resolves the locale from request headers for both the proxy and the locale middleware
  • Moved the home page content to /example (/przyklad in Polish) and made / redirect there
  • Moved ClientLink to routing as LocalizedLink and HistoryProvider inside RoutingProvider
  • Renamed test code to example

@spietras spietras added the feature New feature or request label Nov 26, 2026
@spietras spietras self-assigned this Nov 26, 2026
@spietras
spietras force-pushed the routing branch 4 times, most recently from d87c6e5 to e31c7d3 Compare November 27, 2026 17:53
@spietras
spietras merged commit 3926ecc into main Nov 27, 2026
2 checks passed
@spietras
spietras deleted the routing branch November 27, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant