Feature Requests
Share ideas, discuss and vote on requests from other users in community

Make dates on announcements translatable

WHMCS Cole shared this idea 2 years ago

Currently the dates of announcements only appear in English.

Comments (6)


This is very important feature for non-English sites. Please make this possible!!



Currently, you can add the following to you configuration.php file before the closing PHP ?> tag:

setlocale(LC_TIME, "fr_FR");

Simply replace the locale with the PHP locale that fits your geographic area/language.

This is a static change and will not change based on the selected language being used, but if you keep your WHMCS in a specific language, it could help.


I have tried that in my whmcs v7.2 (using es_ES) and it doesn't work. Not only the announcements dates are in english, some pdf files are generated in english too. The client area also display dates in english.

I've edited language files.

I've used overrides.

I've set my server timezone according to my main language.

None of those worked. Any suggestions?


Well, trick with setlocale() works, but again, before this there was all dates in English. Now I have all dates in Ukrainian (using {$announcement.rawDate|date_format:"%d %B"} in templates and setlocale(LC_TIME, 'uk_UA.UTF-8'); in config). My WHMCS site targets 3 languages: English, Ukrainian and Russian, so a simple locale-change-trick don't solve my issue.

It would be super cool if WHMCS guys and girls looks more into the multilanguage issues like this.


Moreover, there are lack of date localization not only for Announcements, but thru all WHMCS in general. Notice the "Nov 2017" in the sidebar and "24th Nov 2017" as news date stays the same for any choosen interface language. I believe this must be fixed.


Hi all,

I'm pleased to advise this feature has been added in version 7.5. This has been implemented directly into the existing language system by adding these new language strings:

  1. $_LANG['dateTime']['monday'] = "Monday";
  2. $_LANG['dateTime']['tuesday'] = "Tuesday";
  3. $_LANG['dateTime']['wednesday'] = "Wednesday";
  4. $_LANG['dateTime']['thursday'] = "Thursday";
  5. $_LANG['dateTime']['friday'] = "Friday";
  6. $_LANG['dateTime']['saturday'] = "Saturday";
  7. $_LANG['dateTime']['sunday'] = "Sunday";
  8. $_LANG['dateTime']['mon'] = "Mon";
  9. $_LANG['dateTime']['tue'] = "Tue";
  10. $_LANG['dateTime']['wed'] = "Wed";
  11. $_LANG['dateTime']['thu'] = "Thu";
  12. $_LANG['dateTime']['fri'] = "Fri";
  13. $_LANG['dateTime']['sat'] = "Sat";
  14. $_LANG['dateTime']['sun'] = "Sun";
  15. $_LANG['dateTime']['th'] = "th";
  16. $_LANG['dateTime']['nd'] = "nd";
  17. $_LANG['dateTime']['rd'] = "rd";
  18. $_LANG['dateTime']['st'] = "st";
  19. $_LANG['dateTime']['january'] = "January";
  20. $_LANG['dateTime']['february'] = "February";
  21. $_LANG['dateTime']['march'] = "March";
  22. $_LANG['dateTime']['april'] = "April";
  23. $_LANG['dateTime']['may'] = "May";
  24. $_LANG['dateTime']['june'] = "June";
  25. $_LANG['dateTime']['july'] = "July";
  26. $_LANG['dateTime']['august'] = "August";
  27. $_LANG['dateTime']['september'] = "September";
  28. $_LANG['dateTime']['october'] = "October";
  29. $_LANG['dateTime']['november'] = "November";
  30. $_LANG['dateTime']['december'] = "December";
  31. $_LANG['dateTime']['jan'] = "Jan";
  32. $_LANG['dateTime']['feb'] = "Feb";
  33. $_LANG['dateTime']['mar'] = "Mar";
  34. $_LANG['dateTime']['apr'] = "Apr";
  35. $_LANG['dateTime']['may'] = "May";
  36. $_LANG['dateTime']['jun'] = "Jun";
  37. $_LANG['dateTime']['jul'] = "Jul";
  38. $_LANG['dateTime']['aug'] = "Aug";
  39. $_LANG['dateTime']['sept'] = "Sept";
  40. $_LANG['dateTime']['oct'] = "Oct";
  41. $_LANG['dateTime']['nov'] = "Nov";
  42. $_LANG['dateTime']['dec'] = "Dec";
  43. $_LANG['dateTime']['AM'] = "AM";
  44. $_LANG['dateTime']['PM'] = "PM";
  45. $_LANG['dateTime']['am'] = "am";
  46. $_LANG['dateTime']['pm'] = "pm";

This means the dates and times displayed will change based upon the client's language and can be customised extensively via language overrides. We are releasing the 7.5 beta with English, French and Russian date translations included.