for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace CodeZero\Localizer\Detectors;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Request;
class UrlDetector implements Detector
{
/**
* Detect the locale.
*
* @return string|array|null
*/
public function detect()
$position = Config::get('localizer.url-segment');
return Request::segment($position);
}
* Should the detected locale be validated
* as a supported locale?
* @return bool
public function shouldValidate()
return true;