i18n-tag

0.1.1 • Public • Published

i18n tag

Simple i18n tagged template strings. Inspired by Jack Hsu's blog post.

Installation

npm install --save i18n-tag

Usage

i18n.js

import { createI18n } from 'i18n-tag';
 
const vocabulary_ru = {
  '{0} parrots': '{0} попугаев'
};
 
export default createI18n(vocabulary_ru);

index.js

import i18n from './i18n';
 
const n = 38;
 
console.log(i18n`${n} parrots`);

Package Sidebar

Install

npm i i18n-tag

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • chicoxyzzy