Laravel 4 - auto select language based on domain .tld
Add TldLang to your composer.json file:
"require": {
"queiroz/tld-lang": "dev-master"
}
Use composer to install this package.
$ composer update
register this service provider at the bottom of the $providers array: app.php
'Queiroz\TldLang\TldLangServiceProvider'
Supose you have domain.com (English), domain2.es (Spanish), domain3.fr (French) you can simply change the system language based on this .tlds
TldLang::set(array(
'.com' => 'en',
'.es' => 'es',
'.fr' => 'fr'
));
and finally initialize
TldLang::init();