I'm working on a system (portal) that offers service to 19 countries. For each country there is a database and each country with its language dictionary (even countries with the same language, have dicinários diferenets EX: Mexico and Spain). The system was built in PHP, IIS windows 7. I am wanting to migrate the system to php - laravel, apache, linux. The first challenge I'm encountering is the configuration of the .avi's .lv file (latest version). It supports a language and a database.
Enntão logic is the segunte: when the user writes br.portal.mycompany.com the system must retrieve the access credentials br_portal database and TBM recover the labels in Portuguese (br) in the dictionary database .
How could I configure env to accept different credentials for different databases and different languages based on different url possibilities? Eg br.portal.mycompany.com, us.portal.mycompany.com, es.portal.mycompany.com, etc ...