SvelteFluent

The SvelteFluent object provides methods and properties for localization with svelte-fluent.

You can create the SvelteFluent object with the createSvelteFluent function.

SvelteFluent.localize

Localize a fluent message.

fluent.localize('example-message', { name: 'Example' });

Parameters

NameTypeDescription
idstringIdentifier of the fluent message
argsRecord<string, FluentVariable>Interpolation arguments for the message

Return value

The localized message as a string.