Change language to formated month 'F' of existing code

I have a working code that does what I need (hide year from startdate if its same as enddate). But it only shows english month names.

at conexion.php had

    $conn = new PDO('mysql:host='.$host.';dbname='.$db, $user, $pwd);
    $conn->query("SET lc_time_names = 'de_DE'");

lc_time_names worked fine with

    <?php echo $row ['start_date'];?> & <?php echo $row ['end_date'];?>

But with hidden months not: this is the working code

require_once 'conexion.php';
    $conn = dbConnect();
    $sql = 'SELECT start_date, end_date FROM dates';    
    $result = $conn->query($sql);       
    $rows = $result->fetchall();    

            foreach ($rows as $row) {   


    $start=new DateTime($row['start_date']);
    $startYear=$start->format ('Y');
    $end=new DateTime($row['end_date']);

        ($startMonth == $endMonth && $startYear==$endYear) ? "$startDay $startMonth to $endDay $endMonth $startYear" : 
            ( ($startMonth!==$endMonth && $startYear==$endYear) ? "$startDay $startMonth to $endDay $endMonth $startYear" : 
                ( ($startMonth==$endMonth && $startYear!==$endYear) ? "$startDay $startMonth $startYear to $endDay $endMonth $endYear" : 
                                                                     "$startDay $startMonth $startYear to $endDay $endMonth $endYear"
    echo $s.PHP_EOL;