I am building a website in Laravel and need to use a different domain for each language.
Currently I'm using mcamara/laravel-localization for the localization.
For example:
- EN => my-english-website.com
- NL => my-dutch-website.com
It seems like using different domains is not something that is supported by default. Has someone run into this issue and knows how to solve this?
Subdomains are supported by default.
You use
whereto match the {locale} parameter to a regex pattern and then use a middleware to actually set the locale.Maybe you'd have something like this in the middleware
I'm not sure if this was the correct syntax, but you get the idea.