Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

co-i18n

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

co-i18n

A lightweight i18n lib use the [Template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) in ES6.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

co-i18n

A lightweight i18n lib use the Template literals in ES6.

Install

npm install co-i18n --save

Usage

Simple Usage

    var i18n = require('co-i18n');
    
    i18n.init({
        directory: __dirname + '/locales',
        locales: ['en', 'zh-CN']
    });
    
    var s = new i18n('en').i18n `${'greeting'}`;
    console.log(s);

With Koa

    app.use(i18n.co({
        directory: __dirname + '/locales',
        locales: ['en', 'zh-CN']
    }));

Keywords

FAQs

Package last updated on 03 Mar 2016

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