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

    vue-intlayer Package

    The vue-intlayer package provides the necessary tools to integrate Intlayer into Vue applications. It includes a Vue plugin and composables for handling multilingual content.

    Installation

    bash
    npm install vue-intlayer
    

    Exports

    Plugin

    Import:

    tsx
    import "vue-intlayer";
    
    FunctionDescription
    installIntlayerVue plugin to install Intlayer in your application.

    Composables

    Import:

    tsx
    import "vue-intlayer";
    
    ComposableDescriptionRelated documentation
    useIntlayerBased on useDictionary, but injects an optimised version of the dictionary from the generated declaration.-
    useDictionaryProcesses objects that resemble 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.-
    usePathnameReturns the current pathname as a ComputedRef<string> with the locale segment removed. Reactive to popstate.usePathname
    useRewriteURLClient-side composable to manage URL rewrites. Automatically updates the URL if a localised rewrite rule exists.useRewriteURL
    useIntlReturns the Intl object for the current locale.-
    useLoadDynamicComposable to load dynamic dictionaries.-

    Functions

    Import:

    tsx
    import "vue-intlayer";
    
    FunctionDescription
    getDictionaryProcesses objects resembling dictionaries (key, content). Handles t() translations, enumerations, etc.
    getIntlayerBased on getDictionary, but injects an optimised version of the dictionary from the generated declaration.

    Markdown

    Import:

    tsx
    import "vue-intlayer/markdown";
    
    FunctionDescription
    installIntlayerMarkdownVue plugin to install Intlayer Markdown in your application.