You can use the InitialCommand key to set the language.. In your config/database.php file, add the options array to your sqlsrv connection:
'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'options' => [
'CommandTimeout' => 60,
'ConnectionPooling' => true,
'LoginTimeout' => 60,
'InitialCommand' => 'SET LANGUAGE us_english' // We set the language here..
]
],
Alternatively if your using the PDO options approach:
'sqlsrv' => [
// .. your other config
'options' => [
PDO::SQLSRV_ATTR_QUERY_TIMEOUT => 60,
PDO::ATTR_TIMEOUT => 60,
PDO::SQLSRV_ATTR_ENCODING => PDO::SQLSRV_ENCODING_UTF8,
'InitialCommand' => 'SET LANGUAGE us_english; SET DATEFORMAT ymd;'
]
],