Socket
Socket
Sign inDemoInstall

c-3po

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

c-3po

[![NPM](https://nodei.co/npm/c-3po.png?downloads=true)](https://nodei.co/npm/c-3po/)


Version published
Weekly downloads
19
increased by18.75%
Maintainers
1
Weekly downloads
 
Created
Source

c-3po travis

NPM

javascript i18n localization library based on es6 tagged templates

Usage example

import { t, ngettext, msgid } from 'c-3po'

// formatted strings
const name = 'Mike';
const helloMike = t`Hello ${name}`;

// plurals (works for en locale out of the box)
const n = 5;
const msg = ngettext(msgid`${ n } task left`, `${ n } tasks left`, n)

Key features

  • Can resolve translations at build or runtime.
  • Uses es2015 (es6) template literals for formatting.
  • Compatible with GNU gettext utility format (.po, .pot files).
  • Intelligent translations extraction (xgettext alternative).
  • Builtin validation for translated strings format.

Installation

npm install --save c-3po
npm install --save-dev babel-plugin-c-3po

Quick demo - https://jsfiddle.net/AlexMost/9wuafbL5/11/

Docs - https://c-3po.js.org

Tutorials

Keywords

FAQs

Package last updated on 22 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc