New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

i18n-t

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

i18n-t

Very easy to use and dumb i18n utility

1.0.1
latest
Source
npm
Version published
Weekly downloads
4.4K
1.78%
Maintainers
1
Weekly downloads
 
Created
Source

i18n-t

Easy to use i18n utility. It does not contain express specific middlewares, etc.

Build Status NPM version

var I18n = require('i18n-t');


var i18n = new I18n({
    defaultLocale: 'en'
});

// Load locales from a directory
i18n.load('./locales');

// or using a pre-loaded objects
i18n.set({
    en: {
        HELLO: 'Hello {{name}}',
        CATS: '{{0}} cats'
    }
});

// Translate sentences
i18n.t('en', 'HELLO', { name: 'Samy' });
i18n.t('en', 'CATS', 10);

FAQs

Package last updated on 07 Jun 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