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
BandBell
Equalizer band type: bell.
public string BandBell { get; init; }
Property Value
BandHighCut
Equalizer band type: high cut.
public string BandHighCut { get; init; }
Property Value
BandHighShelf
Equalizer band type: high shelf.
public string BandHighShelf { get; init; }
Property Value
BandLowCut
Equalizer band type: low cut.
public string BandLowCut { get; init; }
Property Value
BandLowShelf
Equalizer band type: low shelf.
public string BandLowShelf { get; init; }
Property Value
BandNotch
Equalizer band type: notch.
public string BandNotch { get; init; }
Property Value
Bypass
Menu entry that bypasses (disables) an element, e.g. an equalizer band.
public string Bypass { get; init; }
Property Value
Cancel
Dialog button "Cancel".
public string Cancel { get; init; }
Property Value
CopyAToB
A/B compare: copy the A settings to B.
public string CopyAToB { get; init; }
Property Value
CopyBToA
A/B compare: copy the B settings to A.
public string CopyBToA { get; init; }
Property Value
Delete
Preset menu entry "Delete".
public string Delete { get; init; }
Property Value
DeleteBand
Equalizer: menu entry that deletes a band.
public string DeleteBand { get; init; }
Property Value
DragToResize
Tooltip of CornerResizer.
public string DragToResize { get; init; }
Property Value
DropAudioFile
Hint of an empty WaveformView that accepts dropped files.
public string DropAudioFile { get; init; }
Property Value
English
Built-in English texts (also the fallback for unknown languages).
public static UIStrings English { get; }
Property Value
FileDialogTitle
Default title of the file dialogs opened by FilePathBox.
public string FileDialogTitle { get; init; }
Property Value
French
Built-in French texts.
public static UIStrings French { get; }
Property Value
Integrated
Label of the integrated loudness in LoudnessMeter.
public string Integrated { get; init; }
Property Value
LanguageCode
Two-letter (or IETF) code of the language of this table, e.g. "en".
public string LanguageCode { get; init; }
Property Value
LiveEditHelp
Help bar of the live editor (Ctrl+Shift+E).
public string LiveEditHelp { get; init; }
Property Value
LiveEditHelpSave
Live edit help bar when the layout can be saved to a design file (Ctrl+S).
public string LiveEditHelpSave { get; init; }
Property Value
LoudnessRange
Label of the loudness range (LRA) in LoudnessMeter.
public string LoudnessRange { get; init; }
Property Value
MidiForget
Context-menu entry that removes a MIDI assignment; {0} is the assignment (e.g. "CC 74").
public string MidiForget { get; init; }
Property Value
MidiLearn
Context-menu entry that starts MIDI learn on a control.
public string MidiLearn { get; init; }
Property Value
MidiLearnCancel
Context-menu entry that cancels a running MIDI learn.
public string MidiLearnCancel { get; init; }
Property Value
MidiLearnWaiting
Tooltip shown while a control waits for a MIDI controller.
public string MidiLearnWaiting { get; init; }
Property Value
Momentary
Label of the momentary loudness in LoudnessMeter.
public string Momentary { get; init; }
Property Value
No
Dialog button "No".
public string No { get; init; }
Property Value
NoFile
Text shown by an empty FilePathBox.
public string NoFile { get; init; }
Property Value
Ok
Dialog button "OK".
public string Ok { get; init; }
Property Value
Peak
Label of the sample peak in LoudnessMeter.
public string Peak { get; init; }
Property Value
PresetPlaceholder
Name shown by PresetBar when no preset is selected.
public string PresetPlaceholder { get; init; }
Property Value
RegisteredLanguages
Codes of the registered languages ("en", "fr" and those added with Register(string, UIStrings)).
public static IReadOnlyList<string> RegisteredLanguages { get; }
Property Value
Save
Preset menu entry "Save" (overwrites the current preset).
public string Save { get; init; }
Property Value
SaveAs
Preset menu entry "Save As…" (asks for a new name).
public string SaveAs { get; init; }
Property Value
ShortTerm
Label of the short-term loudness in LoudnessMeter.
public string ShortTerm { get; init; }
Property Value
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
VersionFormat
Version line of AboutBox; {0} is replaced by the version.
public string VersionFormat { get; init; }
Property Value
Yes
Dialog button "Yes".
public string Yes { get; init; }
Property Value
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
Returns
- UIStrings
The matching table, never
null.
FormatMidiForget(string)
Formats MidiForget with an assignment.
public string FormatMidiForget(string assignment)
Parameters
assignmentstringThe 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
versionstringThe 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
languageCodestringTwo-letter ISO 639-1 code (
"de") or IETF tag ("pt-BR").stringsUIStringsThe texts; LanguageCode is set to
languageCode.
Exceptions
- ArgumentException
languageCodeis empty, or is Auto.- ArgumentNullException
stringsisnull.