ezsystems/ezpublish-kernel — pull request #980 by flovntp (2014-09-05 09:04:35+00:00)
Title: EZP-23317 Twig Helper to get field Definition name in a template

# Use case
As a developper, i need a twig helper to get translated field definition name in a template using a twig function like ez_field_name(content, 'myFieldIdentifier', [forcedLAnguage])
This is useful when trying to display name of a field before its value.

# Usage
You can use it like this :
```ez_field_name(content, 'fieldIdentifier', [forcedLanguage])```
And it will display the translated name of the field (extracted from the content type definition in eZ)
note: forcedLanguage is optional and eZ will use local if not defined

# Example:
An Article with 2 fields :
name : "Name" in eng-GB and "Nom" in fre-FR
body: "Body" in eng-GB and "Corps de texte" in fre-FR

In a template, ```ez_field_name(content, 'body')``` will display "Body" in english and "Corps de texte" in french.