Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I have got my own module providing a form and there is one element called "Estimated time" defined like this:

$form['informacie_o_incidente']['field_incident_doba'] = array(
  '#title' => t('Estimated time'),
  '#markup' => '<div class="control-group form-item"><label class="control-label">Estimated time:</label><div id="field_incident_doba_wrapper" class="controls">'.$doba.'</div></div>',
);

I have translated the text "Estimated field" via translation interface, cleared cache several times (both GUI and with drush cc all command). However, when I run this drush command:

drush ev "print t('Estimated time');"

I am getting correctly translated string. So why not on the form?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I think you need add t() in markup and translate sting 'Estimated time:'

$form['informacie_o_incidente']['field_incident_doba'] = array(
  '#title' => t('Estimated time'),
  '#markup' => '<div class="control-group form-item"><label class="control-label">'.t('Estimated time:').'</label><div id="field_incident_doba_wrapper" class="controls">'.$doba.'</div></div>',
);
share|improve this answer
    
How could I be so blind??? Thanks, mate. –  petiar Apr 29 '13 at 2:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.