Table of Contents

Class UIStrings

Namespace
PluginUI
Assembly
PluginUI.dll

Texts that PluginUI itself displays (dialog buttons, preset menu, placeholders, tooltips, live-edit help). One instance per language; select it with Language (or DefaultLanguage for every editor), or assign a custom table to Strings.

public sealed record UIStrings : IEquatable<UIStrings>
Inheritance
UIStrings
Implements
Inherited Members

Examples

// Follow the Windows display language (default), or force one:
UIHost.DefaultLanguage = UILanguages.French;

// Add German, starting from English for any missing text:
UIStrings.Register("de", UIStrings.English with { Cancel = "Abbrechen", Save = "Speichern", Delete = "Löschen" });

Remarks

English (English) and French (French) are built in. Register other languages with Register(string, UIStrings): start from English with a with expression so that texts added in later versions fall back to English instead of being empty.

The language only changes texts. Numbers are always formatted and parsed with a decimal point, whatever the language and the regional settings of the machine (see InvariantNumber).

Texts that belong to your plugin (labels, parameter value names such as "Off" / "On", preset bank names) are not part of this table: they are data of your plugin and stay as you define them.

Properties

BandBandPass

Equalizer band type: band pass.

public string BandBandPass { get; init; }

Property Value

string

BandBell

Equalizer band type: bell.

public string BandBell { get; init; }

Property Value

string

BandHighCut

Equalizer band type: high cut.

public string BandHighCut { get; init; }

Property Value

string

BandHighShelf

Equalizer band type: high shelf.

public string BandHighShelf { get; init; }

Property Value

string

BandLowCut

Equalizer band type: low cut.

public string BandLowCut { get; init; }

Property Value

string

BandLowShelf

Equalizer band type: low shelf.

public string BandLowShelf { get; init; }

Property Value

string

BandNotch

Equalizer band type: notch.

public string BandNotch { get; init; }

Property Value

string

Bypass

Menu entry that bypasses (disables) an element, e.g. an equalizer band.

public string Bypass { get; init; }

Property Value

string

Cancel

Dialog button "Cancel".

public string Cancel { get; init; }

Property Value

string

CopyAToB

A/B compare: copy the A settings to B.

public string CopyAToB { get; init; }

Property Value

string

CopyBToA

A/B compare: copy the B settings to A.

public string CopyBToA { get; init; }

Property Value

string

Delete

Preset menu entry "Delete".

public string Delete { get; init; }

Property Value

string

DeleteBand

Equalizer: menu entry that deletes a band.

public string DeleteBand { get; init; }

Property Value

string

DragToResize

Tooltip of CornerResizer.

public string DragToResize { get; init; }

Property Value

string

DropAudioFile

Hint of an empty WaveformView that accepts dropped files.

public string DropAudioFile { get; init; }

Property Value

string

English

Built-in English texts (also the fallback for unknown languages).

public static UIStrings English { get; }

Property Value

UIStrings

FileDialogTitle

Default title of the file dialogs opened by FilePathBox.

public string FileDialogTitle { get; init; }

Property Value

string

French

Built-in French texts.

public static UIStrings French { get; }

Property Value

UIStrings

Integrated

Label of the integrated loudness in LoudnessMeter.

public string Integrated { get; init; }

Property Value

string

LanguageCode

Two-letter (or IETF) code of the language of this table, e.g. "en".

public string LanguageCode { get; init; }

Property Value

string

LiveEditHelp

Help bar of the live editor (Ctrl+Shift+E).

public string LiveEditHelp { get; init; }

Property Value

string

LiveEditHelpSave

Live edit help bar when the layout can be saved to a design file (Ctrl+S).

public string LiveEditHelpSave { get; init; }

Property Value

string

LoudnessRange

Label of the loudness range (LRA) in LoudnessMeter.

public string LoudnessRange { get; init; }

Property Value

string

MidiForget

Context-menu entry that removes a MIDI assignment; {0} is the assignment (e.g. "CC 74").

public string MidiForget { get; init; }

Property Value

string

MidiLearn

Context-menu entry that starts MIDI learn on a control.

public string MidiLearn { get; init; }

Property Value

string

MidiLearnCancel

Context-menu entry that cancels a running MIDI learn.

public string MidiLearnCancel { get; init; }

Property Value

string

MidiLearnWaiting

Tooltip shown while a control waits for a MIDI controller.

public string MidiLearnWaiting { get; init; }

Property Value

string

Momentary

Label of the momentary loudness in LoudnessMeter.

public string Momentary { get; init; }

Property Value

string

No

Dialog button "No".

public string No { get; init; }

Property Value

string

NoFile

Text shown by an empty FilePathBox.

public string NoFile { get; init; }

Property Value

string

Ok

Dialog button "OK".

public string Ok { get; init; }

Property Value

string

Peak

Label of the sample peak in LoudnessMeter.

public string Peak { get; init; }

Property Value

string

PresetPlaceholder

Name shown by PresetBar when no preset is selected.

public string PresetPlaceholder { get; init; }

Property Value

string

RegisteredLanguages

Codes of the registered languages ("en", "fr" and those added with Register(string, UIStrings)).

public static IReadOnlyList<string> RegisteredLanguages { get; }

Property Value

IReadOnlyList<string>

Save

Preset menu entry "Save" (overwrites the current preset).

public string Save { get; init; }

Property Value

string

SaveAs

Preset menu entry "Save As…" (asks for a new name).

public string SaveAs { get; init; }

Property Value

string

ShortTerm

Label of the short-term loudness in LoudnessMeter.

public string ShortTerm { get; init; }

Property Value

string

SystemLanguage

Two-letter code of the Windows display language of the current user ("en", "fr"…), read from Win32 so that it also works in NativeAOT plugins built with invariant globalization. On other systems, the current UI culture is used; "en" if it cannot be determined.

public static string SystemLanguage { get; }

Property Value

string

VersionFormat

Version line of AboutBox; {0} is replaced by the version.

public string VersionFormat { get; init; }

Property Value

string

Yes

Dialog button "Yes".

public string Yes { get; init; }

Property Value

string

Methods

ForLanguage(string?)

Returns the texts for a language code. Auto (or null) uses the Windows display language (SystemLanguage). A regional tag falls back to its language ("fr-CA" → "fr"), and unknown languages fall back to English.

public static UIStrings ForLanguage(string? languageCode)

Parameters

languageCode string

A language code, Auto or null.

Returns

UIStrings

The matching table, never null.

FormatMidiForget(string)

Formats MidiForget with an assignment.

public string FormatMidiForget(string assignment)

Parameters

assignment string

The assignment text (e.g. "CC 74").

Returns

string

The menu text.

FormatVersion(string)

Formats VersionFormat with a version string.

public string FormatVersion(string version)

Parameters

version string

The version text.

Returns

string

The formatted line.

Register(string, UIStrings)

Registers (or replaces) the texts of a language.

public static void Register(string languageCode, UIStrings strings)

Parameters

languageCode string

Two-letter ISO 639-1 code ("de") or IETF tag ("pt-BR").

strings UIStrings

The texts; LanguageCode is set to languageCode.

Exceptions

ArgumentException

languageCode is empty, or is Auto.

ArgumentNullException

strings is null.