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

@simple-translation-helper/vue

v0.0.7

Published

This package provides a simple translation helper for Vue 3.

Readme

Simple translation helper for Vue 3

This package provides a simple translation helper for Vue 3.

Installation

npm i @simple-translation-helper/vue

Add styling to your main.js:

import "@simple-translation-helper/vue/style.css"

If you want the ability to display the translation keys add the translation-hub component to your App.vue:

<translation-hub :active="conditionToShowHub"/>

Translation hub

The translation-hub is a button that you can use to display the translation keys. This is useful for debugging and for providing a way for translators to see the keys that need to be translated.

Props

| Prop | Type | Default | Description | | --------- |-----------| ------- |--------------------------------------------------------------------------------------------------------------------------------------------| | active | Boolean | false | Determines whether the component is active or not. | | activeBackgroundColor | String | #0891b2 | Determines the active color of the transltion hub button. | | position | String | "top-right" | Determines the position of the component on the page. It must be one of "top-left", "top-right", "bottom-left", or "bottom-right". |

Slots

The component has one default slot that can be used to provide custom content to be displayed instead of the translation keys toggle button. The slot can receive the following property:

| Property | Type | Description | | -------------------------| -------- |---------------------------------------------| | showTranslationKeys | Function | A function that shows the translation keys. | | hideTranslationKeys | Function | A function that hides the translation keys |

Example Usage with slots


<template>
  <div>
    <translation-hub>
      <template #default="{ showTranslationKeys, hideTranslationKeys }">
        <button @click="showTranslationKeys">
          Show keys
        </button>
        <button @click="hideTranslationKeys">
          Show keys
        </button>
      </template>
    </translation-hub>
  </div>
</template>

Translate Component

The translate component designed to display translations of text and give you the option to display the translation key.

Props

| Name | Type | Required | Description | | --- | --- | --- |-----------------------------------------------------------------------| | translationKey | String | Yes | The translation key | | translation | String | Yes | The translated text |

Slots

The translate component has one default slot, which can be used to provide custom content for the component.

Usage example

Here is an example of how you can use the translate component:

<template>
  <translate translation-key="greeting" translation="Hello, world!" />
</template>

In this example, the component will look up the translation for the greeting key with your translation method. If a translation is found, it will be displayed. Otherwise, the default text "Hello, world!" will be displayed.

You can also use the default slot to provide custom content:

<template>
  <translate translation-key="dashboard.title" translation="Welcome to my dashboard">
    Fallback text
  </translate>
</template>