J-BusinessDirectory - Change date language

Support Forum

 
 

 

Hi,

I have succesfully translated J-BusinessDirectory but i've noticed the date in an event or a promotion is still in English.

 

For example:

I know the date for an event is generated as <?php echo getDateGeneralFormat($this->event->start_date) ?> in the default.php file located in /components/com_jbusinessdirectory/views/event/tmpl

I have changed the en_GB ini files but this changes nothing. Am i looking in the wrong place? Please help.

2 replies

Hi,

To have the dates set in your language you must check if your locale is installed on the server that you use. These dates are generated by php and cannot be translated.

Hello guys,

why won't you use the Joomla's core JDate to return the dates - it wil handle and respect the Joomla's language settings.

 

For example the JBusinessUtil::getDateGeneralFormat($data), could become something like:


static function getDateGeneralFormat($data) {

$date = JFactory::getDate($date);

return $date->calendar('j F Y', false, true);

}
 
 
 

3 Item(s)

Show per page