Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Set a single value

Code Block
languagec#
Elements.Company
  .Caption("de-CH", "Firma")
  .Caption("fr-CH", "firme");

...

Code Block
public static class StandardRights
{
  [GermanCaption("Lesen")]
  [EnglishCaption("Read")]
  public const string Read = "read";
}

Defining expressions for captions

If the caption depends on some other property an expression can be assigned to it. This currently only works for standard use-cases. It does not work in the following cases:

  • MultiLanguageProperty

  • List-Layouts

  • PluralCaption of a class

Code Block
Elements.Company
  .CaptionExpression("de-CH", "Active ? 'Aktive Person' : 'Inaktiv'");