14.1 Beta 1 SDK
PluginText14.1 Beta
public sealed class Unbroken.LaunchBox.Plugins.PluginText
Describes plugin-supplied text that LaunchBox can localize and format for the current user.
Remarks
The fallback format is always available. When a resource key is supplied, LaunchBox resolves it from the plugin package'sresources/strings/{culture}.json tables, selects the user's language, and inserts the format arguments using the user's culture. A missing or malformed localized format falls back to the supplied format.
Constructors
PluginText 14.1 Beta
public PluginText(string fallbackFormat, params object?[] formatArguments)Properties
public string FallbackFormat { get; }public System.Collections.Generic.IReadOnlyList<object?> FormatArguments { get; }public string? ResourceKey { get; init; }
FallbackFormat 14.1 Beta
public string FallbackFormat { get; }
Gets the required fallback format used when no localized resource is available or no resource key is supplied.
FormatArguments 14.1 Beta
public System.Collections.Generic.IReadOnlyList<object?> FormatArguments { get; }
Gets the values inserted into the selected format using the user's culture.
ResourceKey 14.1 Beta
public string? ResourceKey { get; init; }
Gets the optional key resolved from the plugin package's localized string resources.
Operators
op_Implicit 14.1 Beta
public static implicit operator Unbroken.LaunchBox.Plugins.PluginText(string fallbackText)Converts a string to literal fallback text without a resource key or format arguments.
fallbackText14.1 Beta- The nonblank literal fallback text.
Returns
The plugin text containing the supplied fallback.- Exception: System.ArgumentException
- The fallback text is null, empty, or whitespace.