svelte-fluent
Docs
  • Getting started
    • What is svelte-fluent?
    • Installation
    • Configure bundler
  • Version 1
    • What’s new?
    • Breaking changes
    • Migration Guide
  • Tutorial
    • First steps
    • Load translations from files
    • Multiple languages
    • Interpolation
    • Interpolation formatting
    • Custom functions
  • Integration
    • SvelteKit
  • Reference
    • FluentContext
    • FluentProvider
    • Localized
    • Overlay
    • SvelteFluent
    • createSvelteFluent
    • getFluentContext
    • initFluentContext
  • Legacy
    • Localized
    • Overlay

initFluentContext

Initializes a new FluentContext with the given SvelteFluent object and adds it to the svelte context.

initFluentContext(() => fluent);

Parameters

NameTypeDescription
fn() => SvelteFluentDefines the SvelteFluent object to be used

Return value

The FluentContext object.


Previous page getFluentContext Next page Legacy