Table of Contents

Class CultureTextAttribute

Namespace
Hi.Common
Assembly
HiGeom.dll

Declares one culture's text for one vocabulary key on the member carrying the attribute — the static wording of command titles and labels, owned by the declaring library as a DEFAULT: a GUI layer may override it or add cultures the library never declared (see SetTextOverride(string, string, string)), and a culture left undeclared is not an error — lookups fall back toward the English key.

The key defaults to the member's own display name: its DisplayNameAttribute value when present, otherwise the member name spaced into words (SpacePascalWords(string)). Set Key to declare a word the member does not itself name (a shared switch word, a mode label). Apply the attribute once per culture.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Enum|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Interface, AllowMultiple = true, Inherited = false)]
public sealed class CultureTextAttribute : Attribute
Inheritance
CultureTextAttribute
Inherited Members
Extension Methods

Constructors

CultureTextAttribute(string, string)

Declares text as the wording of this member's vocabulary key in the culture named cultureName.

public CultureTextAttribute(string cultureName, string text)

Parameters

cultureName string

Culture name the text is written in (e.g. zh-Hant).

text string

The text in that culture.

Properties

CultureName

Culture name the text is written in (e.g. zh-Hant).

public string CultureName { get; }

Property Value

string

Key

Explicit vocabulary key. Default (null): the member's display name as described on the class summary.

public string Key { get; set; }

Property Value

string

Text

The text in that culture.

public string Text { get; }

Property Value

string