Closed (fixed)
Project:
Office Hours
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 May 2012 at 18:03 UTC
Updated:
10 Jun 2012 at 18:21 UTC
Not sure if this is a bug or even if there is a better way to do it. During the content creation form I wanted to translate the days of the weeks. I could managed it modifying the line 69 in the office_hours.elements file:
if (!($element['#weight'] & 1)) { //first cell
$element['#prefix'] = '<div class="office-hours-block"><div class="dayname">' . $days[$day] . '</div>';
}
to:
if (!($element['#weight'] & 1)) { //first cell
$element['#prefix'] = '<div class="office-hours-block"><div class="dayname">' . t($days[$day]) . '</div>';
}If you know a better solution please tell me. Thanks!
Comments
Comment #1
johnvThis is indeed the best way.
For other texts, like 'Add more hours', you can contribute your translations via http://drupal.org/project/l10n_client
Comment #2
Ozeuss commentedcode committed to dev
Comment #3
tangamampilia commentedThanks!