I have this part of the function, which gives me name of the months in English. How can I translate them to my local language (Serbian)?
$month_name = date('F', mktime(0, 0, 0, $i)); Where $i is the number of the month (values 1 - 12). See also PHP:mktime.
You should use setlocale():
setlocale(LC_TIME, 'fr_FR'); $month_name = date('F', mktime(0, 0, 0, $i)); In this case it would set it to French. For your case it should be one of the following:
sr_BA - Serbian (Montenegro) sr_CS - Serbian (Serbia)sr_ME - Serbian (Serbia and Montenegro)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With