Formular: Translation for entity name?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hi-ko
    Member
    • May 2015
    • 90

    Formular: Translation for entity name?

    How could I translate the entity name of a custom entity?
    I tried:
    Code:
    language\translate('customEntityName','scopeNames','Global') ;
    but that did not work.
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1602

    #2
    I don`t know, if it works with scope names (entities), but perhaps with string\replace?

    Comment

    • yuri
      Member
      • Mar 2014
      • 8440

      #3
      Scopes are named (as well as entity types) in UpperCamelCase in the system: https://docs.espocrm.com/administrat...g/#entity-type. Should be
      CustomEntityName.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • hi-ko
        Member
        • May 2015
        • 90

        #4
        Thanks yuri, my bad: I already used correct UpperCamelCase since I retrieve the entity name from the parentType field but does not return the expected translation.
        So should
        Code:
        language\translate('CustomEntityName','scopeNames' ,'Global') ;
        work in you opinion or do I need to use different values for CATEGORY, SCOPE?

        Comment

        • yuri
          Member
          • Mar 2014
          • 8440

          #5
          It should work. 3rd argument can be omitted here. Note, that this function translates to the system language (set in Administration > System > Language).
          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

          Comment

          Working...