Creation:2026-01-21Last update:2026-01-21

    solid-intlayer Package

    The solid-intlayer package provides the necessary tools to integrate Intlayer into Solid applications. It includes providers and hooks for handling multilingual content.

    Installation

    npm install solid-intlayer

    Exports

    Provider

    Import:

    import "solid-intlayer";
    Component Description Related Doc
    IntlayerProvider The main provider that wraps your application and provides the Intlayer context. IntlayerProvider

    Hooks

    Import:

    import "solid-intlayer";
    Hook Description Related Doc
    useIntlayer Based on useDictionary, but injects an optimized version of the dictionary from the generated declaration. useIntlayer
    useDictionary Processes objects that look like dictionaries (key, content). It processes t() translations, enumerations, etc. -
    useDictionaryAsync Same as useDictionary, but handles asynchronous dictionaries. -
    useDictionaryDynamic Same as useDictionary, but handles dynamic dictionaries. -
    useLocale Returns the current locale and a function to set it. useLocale
    useRewriteURL Client-side hook to manage URL rewrites. Automatically updates the URL if a localized rewrite rule exists. useRewriteURL
    useIntl Returns the Intl object for the current locale. -
    useLoadDynamic Hook to load dynamic dictionaries. -
    t Picks content based on the current locale. translation

    Components

    Import:

    import "solid-intlayer";
    Component Description
    MarkdownProvider Provider for markdown rendering context.