Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Set a single value

Elements.Company
  .Caption("de-CH", "Firma")
  .Caption("fr-CH", "firme");

This is the recommended way to set captions.

Defining values for code elements

Quino includes support for decorating code elements (e.g. enums) with language-specific captions and for reading those captions at run-time.

The LanguageTextAttribute associates a string value with a language. Quino defines EnglishCaptionAttribute and GermanCaptionAttribute for convenience. Applications are free to define their own.

The example below shows how to use the attributes.

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

  • No labels