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/web

v0.1.16

Published

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

Readme

loqly-web

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

For detailed documentation and guides, visit the loqly documentation.

Table of Contents

Installation

Install via npm

npm install @loqly/web

Include via script tag

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

Setup

To auto-select your elements, they should have a data attribute like so:

<button data-t="auth.btn.login"></button>
import Loqly from '@loqly/web'

const loqly = new Loqly({
  apiKey: 'your-loqly-api-key',
  defaultLocale: 'en', // Optional, defaults to 'en', used as fallback language
})

// Fetch your translations & translate the current page
await loqly.init()

Updating the language

loqly.updateLanguage('de') // Automatically translates the current page
loqly.locale = 'de' // Updating the language without auto translation

Manually translating elements

// Translate the whole page
loqly.translatePage()

// Translate multiple elements
const paragraphs = document.querySelectorAll('p')
loqly.translateElements(paragraphs)

// Translate a single element
const loginBtn = document.querySelector('button.login')
loginBtn.textContent = loqly.t('auth.btn.login')

Using loqly in custom functionality

You can implement loqly into your existing system and just fetch your translations. No need to init loqly then.

import Loqly from '@loqly/web'

const translations = await Loqly.getTranslations(
  apiKey: 'your-loqly-api-key',

  // Optional configurations
  options: {
    projectIds: ['website'],
    namespaces: ['auth', 'error'],
    languages: ['en', 'de']
  },
  fallback: {
    "auth.btn.login": { en: 'Login', de: 'Anmelden' }
  }
)

Interpolation

You can easily insert dynamic content into your translations using our string interpolation feature.

const count = document.querySelector('.count')
count.textContent = loqly.t('User {user} has {count} new notifications', {
  user: 'Alice',
  count: 3,
})

This will render as:

<p class="count">User Alice has 3 new notifications</p>