Text Format (.Short/.Long)

Text format variants provide different length versions of the same text.

Syntax

// Full method
string result = key.Tr(table).TextFormat(TextFormat.Short);

// Shortcuts
string result = key.Tr(table).Abbr();   // Abbreviated
string result = key.Tr(table).Short();  // Short
string result = key.Tr(table).Long();   // Long

TextFormat Enum

public enum TextFormat
{
    Abbreviated,
    Short,
    Long
}

How It Works

Appends format suffixes:

Table Setup

Key
English

stats.health

Health Points

stats.health.abbreviated

HP

stats.health.short

Health

menu.options

Options

menu.options.short

Opts

time.remaining

Time Remaining: {0}

time.remaining.short

Time: {0}

Examples

Responsive UI

Stats Display

Mobile vs Desktop

Use Cases

Screen Size Adaptation

Tooltip vs Label

Table Headers

Combining with Other Variants

Fallback Behavior

If the format variant doesn't exist, uses the base key:

Common Patterns

Dynamic UI Density

Accessibility Options

Notification Text

Last updated