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 main provider that wraps your application and provides the Intlayer context.IntlayerProvider

    Hooks

    Import:

    tsx
    import "solid-intlayer";
    
    HookDescriptionRelated Doc
    useIntlayerBased on useDictionary, but injects an optimized version of the dictionary from the generated declaration.useIntlayer
    useDictionaryProcesses objects that look like dictionaries (key, content). It processes 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 localized rewrite rule exists.useRewriteURL
    useIntlReturns the Intl object for the current locale.-
    useLoadDynamicHook to load dynamic dictionaries.-
    tPicks content based on the current locale.translation

    Components

    Import:

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