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

@shopplus/membership-i18n

v0.4.2

Published

会员中台共享国际化 - 12 种语言包 + Intl 格式化函数 + RTL 支持

Readme

@shopplus/membership-i18n

Shared internationalization package for ShopPlus Membership SDK. 12 locales, Intl-based formatting, RTL support.

Features

  • 12 built-in locales: en-US, zh-CN, zh-TW, ja-JP, ko-KR, fr-FR, de-DE, es-ES, pt-BR, th-TH, ar-SA, he-IL
  • 106 error code translations per locale
  • UI component text translations
  • Currency, number, and date formatting via Intl APIs
  • RTL detection (Arabic, Hebrew)
  • Lazy-loaded locale chunks (only loaded locale is bundled)
  • Zero runtime dependencies

Install

npm install @shopplus/membership-i18n

Quick Start

import { createI18n } from '@shopplus/membership-i18n';

const i18n = await createI18n('zh-CN');

// Translate a key
i18n.t('common.points');       // "积分"
i18n.t('points.earn', { amount: 100 }); // "获得 100 积分"

// Error code translation
i18n.t('sdk.error.210922');    // "验证码发送过于频繁,请稍后再试"

Formatting

import { formatCurrency, formatNumber, formatDate } from '@shopplus/membership-i18n';

// Currency (uses Intl.NumberFormat)
formatCurrency(99.5, 'USD', 'en-US');   // "$99.50"
formatCurrency(1280, 'JPY', 'ja-JP');   // "¥1,280"

// Number
formatNumber(12345.6, 'de-DE');         // "12.345,6"

// Date (uses Intl.DateTimeFormat)
formatDate(new Date(), 'zh-CN');        // "2026年7月1日"

RTL Support

import { isRTL } from '@shopplus/membership-i18n';

isRTL('ar-SA'); // true
isRTL('he-IL'); // true
isRTL('en-US'); // false

Available Locales

| Locale | Language | Direction | |---|---|---| | en-US | English | LTR | | zh-CN | Simplified Chinese | LTR | | zh-TW | Traditional Chinese | LTR | | ja-JP | Japanese | LTR | | ko-KR | Korean | LTR | | fr-FR | French | LTR | | de-DE | German | LTR | | es-ES | Spanish | LTR | | pt-BR | Brazilian Portuguese | LTR | | th-TH | Thai | LTR | | ar-SA | Arabic | RTL | | he-IL | Hebrew | RTL |

Translation Keys

| Namespace | Description | |---|---| | common.* | Shared UI text (confirm, cancel, loading...) | | points.* | Points-related messages | | level.* | Level/tier messages | | coupon.* | Coupon status text | | checkin.* | Check-in messages | | errors.* | Generic error messages | | ui.* | UI component text (member center, forms, etc.) | | sdk.error.* | Error code translations (106 codes) |

Module Formats

| Format | File | Usage | |---|---|---| | ESM | dist/index.es.js | Bundlers (locale chunks lazy-loaded) | | UMD | dist/index.umd.js | Script tag (all locales bundled) | | Types | dist/index.d.ts | TypeScript support |

License

MIT