Author:
    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

    bash
    npm install solid-intlayer
    

    Exports

    Provider

    Import:

    tsx
    import "solid-intlayer";
    
    ComponentDescriptionRelated doc
    IntlayerProviderThe primary provider that wraps your application and supplies the Intlayer context.IntlayerProvider

    Hooks

    Import:

    tsx
    import "solid-intlayer";
    
    HookDescriptionRelated Doc
    useIntlayerBased on useDictionary, but injects an optimised version of the dictionary from the generated declaration.useIntlayer
    useDictionaryProcesses objects resembling dictionaries (key, content). Handles t() translations, enumerations, etc.-
    useDictionaryAsyncSame as useDictionary, but handles asynchronous dictionaries.-
    useDictionaryDynamicSame as useDictionary, but handles dynamic dictionaries.-
    useLocaleReturns the current locale and a function to set it.useLocale
    usePathnameReturns the current pathname as an Accessor<string> with the locale segment removed. Reactive to popstate.usePathname
    useRewriteURLClient-side hook to manage URL rewrites. Automatically updates the URL if a localised rewrite rule exists.useRewriteURL
    useIntlReturns the Intl object for the current locale.-
    useLoadDynamicHook to load dynamic dictionaries.-
    tSelects content based on the current locale.translation

    Components

    Import:

    tsx
    import "solid-intlayer";
    
    ComponentDescription
    MarkdownProviderProvider for Markdown rendering context.