Skip to content

Commit

Permalink
com_fields: allowing custom field Label to be translated by a string (#…
Browse files Browse the repository at this point in the history
…12656)

* com_fields: Allow translation of field label via language string

* better this way
  • Loading branch information
infograf768 authored and roland-d committed Nov 13, 2016
1 parent 9196431 commit 1a21f17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/com_fields/layouts/field/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}

$field = $displayData['field'];
$label = $field->label;
$label = JText::_($field->label);
$value = $field->value;
$class = $field->params->get('render_class');

Expand All @@ -26,6 +26,6 @@
?>

<dd class="field-entry <?php echo $class; ?>" id="field-entry-<?php echo $field->id; ?>">
<span class="field-label"><?php echo htmlentities($label); ?>: </span>
<span class="field-label"><?php echo htmlentities($label, ENT_QUOTES | ENT_IGNORE, "UTF-8"); ?>: </span>
<span class="field-value"><?php echo $value; ?></span>
</dd>

0 comments on commit 1a21f17

Please sign in to comment.