LaunchBoxCONTRIBUTORS
On this page

14.1 Beta 1 SDK

This reference documents the current beta SDK. Beta APIs can change before stable.

PluginText14.1 Beta

C#
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's resources/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

C#
public PluginText(string fallbackFormat, params object?[] formatArguments)
Initializes text with a required fallback format and optional format arguments.
fallbackFormat 14.1 Beta
The fallback text or composite format string.
formatArguments 14.1 Beta
The values inserted into the selected format using the user's culture.

Properties

FallbackFormat 14.1 Beta

C#
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

C#
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

C#
public string? ResourceKey { get; init; }
Gets the optional key resolved from the plugin package's localized string resources.

Operators

op_Implicit 14.1 Beta

C#
public static implicit operator Unbroken.LaunchBox.Plugins.PluginText(string fallbackText)
Converts a string to literal fallback text without a resource key or format arguments.
fallbackText 14.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.