Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 2 replies, has 2 voices, and was last updated by  farzam.sayeh 1 year, 2 months ago.

  • Creator
  • #22239


    Hi everyone,

    I want to translate the field names in Logging Modifications that is shown to the user. For example in an entity there is a field named as owner. If it changes in a record, the log will show old owner and new owner with label ‘owner’ (exactly the field name).
    I changed “collKey” to “collKey|trans” in “new.html.twig” and “old.html.twig” in Oro/Bundle/DataAuditBundle/Resources/view/Datagrid/Property.

    So the problem is how should I create translation keys according to bundle name and Entity name for fields? (For example the “owner” field in “AddressBundle/Address”)

    Any suggestion?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #22400
    Mike Kudelya
    Mike Kudelya
    Oro Core


    As one of solutions i suggest create new label field in the AuditField entity and call createField function with label. Label you can get from config. Then change call $field->getField() to $field->getLabel() (new function). After that you can translate your field.



    Hi Mark,

    Thank you. That was a nice solution. What I did was creating a function using objectClass and field in AbstractAudit class that makes a key for translation. Like orocrm.account.account.owner

    Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.