AbstractAbstracttext$Gets the text for given Translatable from the specified application. Text requests are cached.
A Translatable is a string that, if starting with the percent symbol (%), is passed to the specified application for translation, with the percent symbol omitted.
Otherwise, the text is returned as is.
Interpolation parameters can either be passed via options or appended to the translatable in matrix notation. If appended to the translatable, semicolons must be escaped with two backslashes (\\;).
Specifies the translatable.
Options for requesting the text.
Optionalparams?: Map<string, unknown> | Record<string, unknown>Parameters for text interpolation.
Application that provides the text.
Optionalttl?: numberTime to retain texts in the cache after the last subscriber unsubscribes, in milliseconds. Defaults to the next animation frame.
Observable emitting the requested text or undefined if not found.
Localized texts are emitted in the current language, and each time when the language changes.
If an error occurs, the observable emits the passed translation key and then completes. The error is not propagated.
Beans.get(WorkbenchTextService).text$('%key', {provider: 'app'});
Beans.get(WorkbenchTextService).text$('%key;param1=value1;param2=value2', {provider: 'app'});
// Alternatively, parameters can be passed via options.
Beans.get(WorkbenchTextService).text$('%key', {params: {param1: 'value1', param2: 'value2'}, provider: 'app'});
Provides texts from micro applications.
Applications can register a text provider using WorkbenchClient.registerTextProvider to provide texts to other applications.
To get texts from another application, the application must declare an intention: