ah, we developers are some times lazy bastards.
To translate those string you will have the following changes.
Go to components/com_comment/joscomment/utils.php and find those lines:
if ((int)$years) {
$formatDate = sprintf('%d year' . ((int)$years == 1 ? '' : 's'). ' ago', $years);
} elseif ((int)$months) {
$formatDate = sprintf('%d month' . ((int)$months == 1 ? '' : 's'). ' ago', $months);
} elseif ((int)$days) {
$formatDate = sprintf('%d day' . ((int)$days == 1 ? '' : 's'). ' ago', $days);
} elseif ((int)$hours) {
$formatDate = sprintf('%d hour' . ((int)$hours == 1 ? '' : 's'). ' ago', $hours);
} elseif ((int)$minutes) {
$formatDate = sprintf('%d minute' . ((int)$minutes == 1 ? '' : 's'). ' ago', $minutes);
} elseif ((int)$seconds) {
$formatDate = sprintf('%d second' . ((int)$seconds == 1 ? '' : 's'). ' ago', $seconds);
} else {
$formatDate = sprintf('%d second' . ((int)$seconds == 1 ? '' : 's'). ' ago', $seconds);
}
around line 600
and change them to this:
if ((int)$years) {
$formatDate = JText::sprintf('%d YEAR' . ((int)$years == 1 ? '' : 'S'). ' AGO', $years);
} elseif ((int)$months) {
$formatDate = JText::sprintf('%d MONTH' . ((int)$months == 1 ? '' : 'S'). ' AGO', $months);
} elseif ((int)$days) {
$formatDate = JText::sprintf('%d DAY' . ((int)$days == 1 ? '' : 'S'). ' AGO', $days);
} elseif ((int)$hours) {
$formatDate = JText::sprintf('%d HOUR' . ((int)$hours == 1 ? '' : 'S'). ' AGO', $hours);
} elseif ((int)$minutes) {
$formatDate = JText::sprintf('%d MINUTE' . ((int)$minutes == 1 ? '' : 'S'). ' AGO', $minutes);
} elseif ((int)$seconds) {
$formatDate = JText::sprintf('%d SECOND' . ((int)$seconds == 1 ? '' : 'S'). ' AGO', $seconds);
} else {
$formatDate = JText::sprintf('%d SECOND' . ((int)$seconds == 1 ? '' : 'S'). ' AGO', $seconds);
}
After this open your language file
your language.com_comment.ini and add translation for this:
%D YEAR AGO = %d year ago
%D YEARS AGO = %d years ago
%D MONTH AGO = %d month ago
%D MONTHS AGO = %d months ago
%D WEEK AGO = %d week ago
%D WEEKS AGO = %d weeks ago
%D DAY AGO = %d day ago
%D DAYS AGO = %d days ago
%D HOUR AGO = %d hour ago
%D HOURS AGO = %d hours ago
%D SECOND AGO = %d second ago
%D SECONDS AGO = %d seconds ago