Interface: IL10nApi
Defined in: Extensions/ExtensionApiTypes.ts:570
Extension catalogs ship in l10n/<bcp47>.json files inside the extension
package. The host loads them into Spec B's I18nService under a namespace
prefixed with the extension ID, so ext.greekTools.openLexicon resolves to
the extension's own catalog.
Properties
onDidChangeLocale
onDidChangeLocale:
IEventApi<string>
Defined in: Extensions/ExtensionApiTypes.ts:583
Methods
currentLocale()
currentLocale():
Promise<string>
Defined in: Extensions/ExtensionApiTypes.ts:582
The host's current UI locale, e.g. 'en' or 'pt-BR'.
Returns
Promise<string>
t()
t(
key,params?):Promise<string>
Defined in: Extensions/ExtensionApiTypes.ts:572
Resolve a localization key against the extension's catalog.
Parameters
key
string
params?
Record<string, unknown>
Returns
Promise<string>