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 localeexample.my→ms-MYexample.jp→ja-JP
When a request comes in, the middleware can:
- Detect the incoming host
- Resolve the target locale from your config
- 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.
