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

qudtlib-js-i18n

v0.3.0

Published

Multilingual labels extension for @qudtlib/allunits

Readme

qudtlib-js-i18n

Multilingual labels extension for @qudtlib/allunits.

@qudtlib/allunits ships only English (en / en-US) labels. This package patches Unit and QuantityKind instances at import time with ~14,000 labels from three sources:

  • QUDT ontology — 20+ languages for units and quantity kinds
  • Wikidata — French (fr) only, filling gaps not covered by QUDT
  • AI/manual translation — French (fr) only, for the ~700 quantity kinds not covered by either of the above

Note on French translations: French has 100% quantity kind coverage, but a significant portion of those labels were generated by AI (Claude) and reviewed by the project author — not sourced from an authoritative reference. They should be treated as unofficial and may not match the terminology used in French scientific literature or standards.

Installation

npm install qudtlib-js-i18n

Peer dependencies (@qudtlib/allunits and @qudtlib/core) must also be installed:

npm install @qudtlib/allunits @qudtlib/core

Usage

Replace your existing import:

// Before
import { Units, Qudt } from "@qudtlib/allunits";

// After
import { Units, Qudt } from "qudtlib-js-i18n";

Everything from @qudtlib/allunits is re-exported, and multilingual labels are applied as a side effect at import time.

Units

import { Units } from "qudtlib-js-i18n";

Units.M.getLabelForLanguageTag("de"); // "Meter"
Units.M.getLabelForLanguageTag("fr"); // "Mètre"
Units.M.getLabelForLanguageTag("ja"); // "メートル"
Units.M.getLabelForLanguageTag("zh"); // "米"
Units.M.getLabelForLanguageTag("en"); // "Metre" (still works)

QuantityKinds

import { QuantityKinds, Qudt } from "qudtlib-js-i18n";

// Via the QuantityKinds object (autocomplete available)
QuantityKinds.Mass.getLabelForLanguageTag("de"); // "Masse"
QuantityKinds.Mass.getLabelForLanguageTag("fr"); // "masse"
QuantityKinds.Mass.getLabelForLanguageTag("ja"); // "質量"

// Via Qudt.quantityKindFromLocalname()
const vel = Qudt.quantityKindFromLocalname("Velocity");
vel?.getLabelForLanguageTag("fr"); // "vitesse"

// Via full IRI
const temp = Qudt.quantityKind("http://qudt.org/vocab/quantitykind/Temperature");
temp?.getLabelForLanguageTag("fr"); // "température"

Languages covered

| Source | Languages | |---|---| | QUDT ontology | Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Greek (el), Spanish (es), Persian (fa), French (fr), Hebrew (he), Hindi (hi), Hungarian (hu), Italian (it), Japanese (ja), Latin (la), Malay (ms), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Slovenian (sl), Turkish (tr), Chinese (zh), and more | | Wikidata | French (fr) — units and quantity kinds only | | AI translation (unofficial) | French (fr) — quantity kinds only, where QUDT and Wikidata have no French label |

French has the broadest coverage, but note that a large portion of its quantity kind labels are AI-generated and unofficial (see note above).

Keeping labels up to date

Labels are regenerated weekly from the QUDT ontology and Wikidata via a GitHub Actions workflow. You can also regenerate manually:

npm run generate

ESM only

This package is ESM-only ("type": "module").