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

@loqly/vue

v0.1.16

Published

The loqly Vue package helps you using the loqly platform for internationalization and copy management.

Downloads

10

Readme

loqly-vue

loqly-vue is a JavaScript package that makes it easy to integrate loqly for internationalization and copy management in your Vue.js projects.

For detailed documentation and guides, visit the loqly documentation.

Table of Contents

Installation

Install via npm

npm install @loqly/vue

Include via script tag

<script src="https://unpkg.com/@loqly/vue/dist/index.umd.js"></script>

Setup

In your main.js, import LoqlyVue and register it as a plugin:

import { createApp } from 'vue'
import App from './App.vue'
import LoqlyVue, { getTranslations } from '@loqly/vue'

const app = createApp(App)

const translations = await getTranslations('your-loqly-api-key')
app.use(LoqlyVue, {
  translations: translations,
  defaultLocale: 'en', // Optional, default is 'en'
  func: '$t', // Optional, name of global translate function, default is '$t'
})

app.mount('#app')

If you pass a fallback object to the plugin, your translations should be structured like this:

{
  "auth.btn.login": {
    "en": "Login",
    "de": "Anmelden"
  },
  "error_404": {
    "en": "Page not found.",
    "de": "Seite konnte nicht gefunden werden."
  }
}

Translating in Components

After registering the plugin, a global translation function (default: $t) will be available in all templates:

<button>{{ $t('auth.btn.login') }}</button>

If you configured for example func: 't', you would instead write:

<button>{{ t('auth.btn.login') }}</button>

If you prefer, you can call the translate function directly instead of using the global $t:

import { translate } from '@loqly/vue'

const btnText = translate('auth.btn.login')

Interpolation

You can easily insert dynamic content into your translations using our string interpolation functionality:

<h2>
  {{
    t(
      'User {user} has {count} new notifications',
      { user: 'Alice', count: 3 }
    )
  }}
</h2>

This will render as:

<h2>User Alice has 3 new notifications</h2>

Updating the language

To change the current language dynamically, use the useLoqly composable inside your components:

<script setup>
import { useLoqly } from '@loqly/vue'

const { updateLanguage } = useLoqly()
</script>

<template>
  <button @click="updateLanguage('de')">Switch to German</button>
  <button @click="updateLanguage('en')">Switch to English</button>
</template>