npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@loklify/vue

v0.1.6

Published

Loklify SDK · Vue 3 plugin with vue-i18n integration. Load your translations from Loklify at runtime.

Readme

@loklify/vue

npm

Vue 3 plugin for Loklify, the translation management platform for small teams. Loads your translations from Loklify and injects them into vue-i18n automatically. Edit a string in the dashboard, your app picks it up without rebuilding.

Manage your translations at app.loklify.com · free tier available.

Install

npm install @loklify/vue vue-i18n

vue-i18n is an optional peer dependency. Skip it if you only want to fetch raw translations and inject them yourself.

Usage with vue-i18n

import { createApp } from 'vue'
import { createI18n } from 'vue-i18n'
import { createLoklify } from '@loklify/vue'
import App from './App.vue'

const app = createApp(App)

const i18n = createI18n({
  legacy: false,
  locale: 'en',
  fallbackLocale: 'en',
})

const loklify = createLoklify({
  project: 'your-project-id',
  i18n: {
    locale:           i18n.global.locale,
    setLocaleMessage: i18n.global.setLocaleMessage,
  },
})

app.use(i18n)
app.use(loklify)
app.mount('#app')

That's it. The plugin loads the active locale at startup and auto-fetches when i18n.locale changes. Find your project ID in the Loklify dashboard at app.loklify.com.

Usage without vue-i18n

import { createLoklify, useLoklify } from '@loklify/vue'

app.use(createLoklify({ project: 'your-project-id' }))

// Anywhere in a component:
const { client, loadLocale } = useLoklify()

await loadLocale('fr')
const messages = await client.loadLocale('fr')

API

createLoklify(options)

Returns a Vue plugin.

| Option | Type | Required | Description | |---|---|---|---| | project | string | yes | Your Loklify project ID | | token | string | no | Bearer token for private projects | | apiBase | string | no | Override API URL | | i18n | { locale, setLocaleMessage } | no | A vue-i18n instance reference for auto-injection |

useLoklify()

Composable that returns the underlying client and the loadLocale helper. Throws if used outside a tree where the plugin is installed.

const { client, loadLocale } = useLoklify()

How it works

  1. On app.use(loklify), the plugin loads the current locale.
  2. It calls i18n.setLocaleMessage(lang, messages) to merge the fetched translations.
  3. A watch on i18n.locale triggers the same flow whenever the user switches language.
  4. Each language is fetched at most once per session (in-memory cache).

Related packages

Links

License

MIT