Skip to content

Instantly share code, notes, and snippets.

@pavel-one
Created April 27, 2018 01:24
Show Gist options
  • Save pavel-one/8e9fbd01ebee68225c12e7f65f21e350 to your computer and use it in GitHub Desktop.
Save pavel-one/8e9fbd01ebee68225c12e7f65f21e350 to your computer and use it in GitHub Desktop.
<?php
$arr = explode(' ', $input);
$month = $arr[1];
$trans = array("January" => "января",
"February" => "февраля",
"March" => "марта",
"April" => "апреля",
"May" => "мая",
"June" => "июня",
"July" => "июля",
"August" => "августа",
"September" => "сентября",
"October" => "октября",
"November" => "ноября",
"December" => "декабря",
);
return $arr[0].' '.strtr($month, $trans);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment