Is there a way to extend BB_Locale?
Today, BB_Locale calls init and that’s that. No hooks/event handling at all, as far as I can tell.
In method init, among other things, the following loads:
$this->datetime_formatstring['datetime'] = __('F j, Y - h:i A');
$this->datetime_formatstring['date'] = __('F j, Y');
$this->datetime_formatstring['time'] = __('h:i A');
What if anything can I do if I want to have a
datetime_formatstring['special-date'] = __('Y F j - h');added to BB_Locale. I’m using the three existing formats as listed above already and I want to add a fourth alternative without adding a row in core BB-files.
Just to be clear, I want to be able to do this:
_e("Today's date, formatted in a special way is:") . bb_datetime_format_i18n( bb_current_time(), 'special-date' );
Am I missing something obvious here or is the only solution right now to modify the locale.php file?
Appreciate the help.
You must be logged in to reply to this topic.