src/Date/DateUtil.php
public function translateMonths(string $date)
    {
        foreach (array_flip($this->getMonthTranslationMap()) as $translated => $english) {
            if (false !== strpos($date, $english)) {
                $date = str_replace($english, $translated, $date);
            }
        }

        foreach (array_flip($this->getShortMonthTranslationMap()) as $translated => $english) {
            if (false !== strpos($date, $english)) {
                $date = str_replace($english, $translated, $date);
            }
        }

        return $date;
    }
public function translateMonths(string $date)
    {
        foreach (array_flip($this->getMonthTranslationMap()) as $translated => $english) {
            if (false !== strpos($date, $english)) {
                $date = str_replace($english, $translated, $date);
            }
        }

        foreach (array_flip($this->getShortMonthTranslationMap()) as $translated => $english) {
            if (false !== strpos($date, $english)) {
                $date = str_replace($english, $translated, $date);
            }
        }

        return $date;
    }
public function translateMonths ( string $ date ) { foreach ( array_flip ( $ this -> getMonthTranslationMap ( ) ) as $ translated => $ english ) { if ( false !== strpos ( $ date , $ english ) ) { $ date = str_replace ( $ english , $ translated , $ date ) ; } } foreach ( array_flip ( $ this -> getShortMonthTranslationMap ( ) ) as $ translated => $ english ) { if ( false !== strpos ( $ date , $ english ) ) { $ date = str_replace ( $ english , $ translated , $ date ) ; } } return $ date ; }
Translates available months inside a given string from English to the current language.

@param string $date

@return mixed|string
Translates available months inside a given string from English to the current language .