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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@kevinmarrec/vue-i18n

v1.1.5

Published

Opinionated Internationalization (i18n) Vue plugin.

Readme

@kevinmarrec/vue-i18n

Description

Opinionated Internationalization (i18n) Vue plugin.

Opinions

  • Lazy loading of locales

  • Fallbacking

    • Configure which locale to use when your preferred language lacks a translation
    • If the fallback locale also lacks the translation, the key will be returned as is
  • Message Format features

    • Standard & nested keys

      • t('foo') resolves foo
      • t('foo.bar') resolves foo ➡️ bar
      • t('foo.bar.baz') resolves foo ➡️ bar ➡️ baz
    • Named interpolation

      • Hello {name} + t('key', { name: 'John' }) = Hello John
    • List interpolation

      • Hello {0} {1} + t('key', ['John', 'Doe']) = Hello John Doe
    • Pluralization

      • car | cars + t('key', 0) = cars
      • car | cars + t('key', 1) = car
      • car | cars + t('key', 2) = cars
      • no apples | one apple | {count} apples + t('key', 0) = no apples
      • no apples | one apple | {count} apples + t('key', 1) = one apple
      • no apples | one apple | {count} apples + t('key', 2) = 2 apples
  • Supports Server-Side Rendering (SSR) & Static Site Generation (SSG)

Usage

This package is mainly meant to be used with Vite SSG.

The createI18n function returns a Promise that resolves to the i18n plugin, so you must asynchronously use it in your app.

This is required to ensure the following behaviors:

  • Client-side rendering (CSR) lazy loads the base & fallback locales when rendering the app.
  • Server-side rendering (SSR) loads the base & fallback locales before rendering the app.
import { createI18n } from '@kevinmarrec/vue-i18n'
import { ViteSSG } from 'vite-ssg/single-page'

import App from './App.vue'

export const createApp = ViteSSG(App, ({ app }) => {
  const i18n = await createI18n({
    messages: import.meta.glob('./locales/*.{json,yaml,yml}')
  })

  app.use(i18n)
})
<script setup lang="ts">
import { useI18n } from '@kevinmarrec/vue-i18n'

const { t } = useI18n()
</script>

<template>
  <div>{{ t('welcome') }}</div>
</template>