@lanun/antarabangsa logo@lanun/antarabangsa

Domain based locale system

The middleware in @lanun/antarabangsa-next supports redirecting / rewriting users to a locale specific domain based on your routing configuration.

For example:

  • example.com → default locale
  • example.myms-MY
  • example.jpja-JP

When a request comes in, the middleware can:

  1. Detect the incoming host
  2. Resolve the target locale from your config
  3. Redirect or rewrite the request to the correct locale domain

This makes it easy to implement multi domain, multi locale setups without duplicating routing logic across apps.