To get date with get_the_time
in Italian you should specify italian (it_IT
) in the WP_LANG constamt in your wp_config.php
file. If this doesn’t work (or if this affects your blog showing dates in italian where you don’t want them), there is always the fast DIRTY way. Put this function in your functions.php
file and use where you need:
WordPress Date Italian
function getDataIta() { $s = strtolower( get_the_time( "j F Y" ) ); $s = str_replace("july","luglio",$s); $s = str_replace("august","agosto",$s); $s = str_replace("september","settembre",$s); $s = str_replace("october","ottobre",$s); $s = str_replace("november","novembre",$s); $s = str_replace("december","dicembre",$s); $s = str_replace("january","gennaio",$s); $s = str_replace("february","febbraio",$s); $s = str_replace("march","march",$s); $s = str_replace("april","aprile",$s); $s = str_replace("may","maggio",$s); $s = str_replace("june","giugno",$s); return $s; }